open-consul/agent/consul
Pierre Souchay b0fc91a1d2 [Performance On Large clusters] Reduce updates on large services (#4720)
* [Performance On Large clusters] Checks do update services/nodes only when really modified to avoid too many updates on very large clusters

In a large cluster, when having a few thousands of nodes, the anti-entropy
mechanism performs lots of changes (several per seconds) while
there is no real change. This patch wants to improve this in order
to increase Consul scalability when using many blocking requests on
health for instance.

* [Performance for large clusters] Only updates index of service if service is really modified

* [Performance for large clusters] Only updates index of nodes if node is really modified

* Added comments / ensure IsSame() has clear semantics

* Avoid having modified boolean, return nil directly if stutures are Same

* Fixed unstable unit tests TestLeader_ChangeServerID

* Rewrite TestNode_IsSame() for better readability as suggested by @banks

* Rename ServiceNode.IsSame() into IsSameService() + added unit tests

* Do not duplicate TestStructs_ServiceNode_Conversions() and increase test coverage of IsSameService

* Clearer documentation in IsSameService

* Take into account ServiceProxy into ServiceNode.IsSameService()

* Fixed IsSameService() with all new structures
2018-10-11 12:42:39 +01:00
..
autopilot autopilot: don't follow the normal server removal rules for nonvoters 2018-08-14 14:24:51 -07:00
fsm Merge branch 'master' into ca-snapshot-fix 2018-08-16 13:00:54 -07:00
prepared_query Allow ignoring checks by ID when defining a PreparedQuery. Fixes #3727. 2018-04-10 14:04:16 +01:00
state [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
acl.go Updated swith case to use same branch for async-cache and extend-cache 2018-07-02 17:39:34 +02:00
acl_endpoint.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
acl_endpoint_test.go
acl_replication.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
acl_replication_test.go BUGFIX: Unit test relying on WaitForLeader() did not work due to wrong test (#4472) 2018-08-06 19:46:09 -04:00
acl_test.go BUGFIX: Unit test relying on WaitForLeader() did not work due to wrong test (#4472) 2018-08-06 19:46:09 -04:00
autopilot.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
autopilot_oss.go Fix vet error 2017-12-18 18:04:42 -08:00
autopilot_test.go autopilot: don't follow the normal server removal rules for nonvoters 2018-08-14 14:24:51 -07:00
catalog_endpoint.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
catalog_endpoint_test.go Added SOA configuration for DNS settings. (#4714) 2018-10-10 15:50:56 -04:00
client.go Fixup formatting 2018-07-12 10:14:26 -04:00
client_serf.go Allow for easy enterprise/oss coexistence 2018-05-24 10:36:42 -04:00
client_test.go Add a Client ReloadConfig test 2018-06-11 16:23:51 -04:00
config.go agent: add primary_datacenter and connect replication config options 2018-10-10 12:17:59 -07:00
connect_ca_endpoint.go connect/ca: more OSS split for multi-dc 2018-10-10 12:17:59 -07:00
connect_ca_endpoint_test.go Fix more unstable tests in agent and command 2018-09-12 14:49:27 +01:00
consul_ca_delegate.go Move connect CA provider to separate package 2018-06-14 09:42:15 -07:00
coordinate_endpoint.go Fill out the tests around coordinate/node functionality 2017-10-31 15:36:44 -07:00
coordinate_endpoint_test.go Fix more unstable tests in agent and command 2018-09-12 14:49:27 +01:00
enterprise_client_oss.go Allow for easy enterprise/oss coexistence 2018-05-24 10:36:42 -04:00
enterprise_server_oss.go Allow for easy enterprise/oss coexistence 2018-05-24 10:36:42 -04:00
filter.go
filter_test.go Introduce Code Policy validation via sentinel, with a noop implementation 2017-09-25 13:44:55 -05:00
flood.go
health_endpoint.go agent: address PR feedback 2018-06-14 09:41:49 -07:00
health_endpoint_test.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
helper_test.go Cleans up some drift between the OSS and Enterprise trees. 2017-10-11 15:53:07 -07:00
intention_endpoint.go agent/consul: set precedence value on struct itself 2018-06-25 12:24:16 -07:00
intention_endpoint_test.go agent/consul: set precedence value on struct itself 2018-06-25 12:24:16 -07:00
internal_endpoint.go Allows disabling WAN federation by setting serf WAN port to -1 2018-03-26 14:21:06 -05:00
internal_endpoint_test.go
issue_test.go Moves the FSM into its own package. 2017-11-29 18:36:53 -08:00
kvs_endpoint.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
kvs_endpoint_test.go Replace time.Now().Sub(x) with time.Since(x) 2017-10-17 20:38:24 +02:00
leader.go connect/ca: more OSS split for multi-dc 2018-10-10 12:17:59 -07:00
leader_oss.go connect/ca: more OSS split for multi-dc 2018-10-10 12:17:59 -07:00
leader_test.go [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
merge.go Takes the skip out of the client check. 2017-09-06 17:05:40 -07:00
merge_test.go
operator_autopilot_endpoint.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
operator_autopilot_endpoint_test.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
operator_endpoint.go
operator_raft_endpoint.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
operator_raft_endpoint_test.go Removes bogus getPort() in favor of freeport. 2017-11-08 19:55:50 -08:00
prepared_query_endpoint.go agent/consul: support a Connect option on prepared query request 2018-06-25 12:24:12 -07:00
prepared_query_endpoint_test.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
raft_rpc.go
rpc.go [BUGFIX] Avoid returning empty data on startup of a non-leader server (#4554) 2018-08-23 12:06:39 -04:00
rpc_test.go [BUGFIX] Avoid returning empty data on startup of a non-leader server (#4554) 2018-08-23 12:06:39 -04:00
rtt.go Added Coordinate.Node rpc endpoint and client api method 2017-10-26 19:16:40 -07:00
rtt_test.go Fix more unstable tests in agent and command 2018-09-12 14:49:27 +01:00
segment_oss.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
serf_test.go
server.go connect/ca: more OSS split for multi-dc 2018-10-10 12:17:59 -07:00
server_lookup.go
server_lookup_test.go
server_oss.go agent/consul: RPC endpoints to list roots 2018-06-14 09:41:50 -07:00
server_serf.go do not bootstrap with non voters 2018-09-19 17:41:36 -07:00
server_test.go do not bootstrap with non voters 2018-09-19 17:41:36 -07:00
session_endpoint.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
session_endpoint_test.go Fixed more flaky tests in ./agent/consul (#4617) 2018-09-04 14:02:47 +01:00
session_timers.go
session_timers_test.go
session_ttl.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
session_ttl_test.go Moves the FSM into its own package. 2017-11-29 18:36:53 -08:00
snapshot_endpoint.go
snapshot_endpoint_test.go Fix more unstable tests in agent and command 2018-09-12 14:49:27 +01:00
stats_fetcher.go Fix stats fetcher healthcheck RPCs not being independent 2018-08-14 14:23:52 -07:00
stats_fetcher_test.go Fix more unstable tests in agent and command 2018-09-12 14:49:27 +01:00
status_endpoint.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
status_endpoint_test.go
txn_endpoint.go Remove deprecated metric names 2018-05-08 16:23:15 -07:00
txn_endpoint_test.go
util.go remove golint warnings 2018-01-28 22:40:13 +04:00
util_test.go