open-consul/agent/consul/state
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
..
acl.go Creates a registration mechanism for schemas. 2017-11-29 18:36:52 -08:00
acl_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
autopilot.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
autopilot_test.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
catalog.go [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
catalog_test.go [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
connect_ca.go Add tests for the built in CA's state store table 2018-06-14 09:42:06 -07:00
connect_ca_test.go Use provider state table for a global serial index 2018-06-14 09:42:15 -07:00
coordinate.go Creates a registration mechanism for schemas. 2017-11-29 18:36:52 -08:00
coordinate_test.go Fill out the tests around coordinate/node functionality 2017-10-31 15:36:44 -07:00
delay.go Spelling (#3958) 2018-03-19 16:56:00 +00:00
delay_test.go pkg refactor 2017-06-10 18:52:45 +02:00
graveyard.go pkg refactor 2017-06-10 18:52:45 +02:00
graveyard_test.go pkg refactor 2017-06-10 18:52:45 +02:00
index_connect.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
index_connect_test.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
intention.go Fix hot loop in cache for RPC returning zero index. 2018-06-25 12:25:37 -07:00
intention_test.go Fix hot loop in cache for RPC returning zero index. 2018-06-25 12:25:37 -07:00
kvs.go Creates a registration mechanism for schemas. 2017-11-29 18:36:52 -08:00
kvs_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
prepared_query.go Creates a registration mechanism for schemas. 2017-11-29 18:36:52 -08:00
prepared_query_index.go pkg refactor 2017-06-10 18:52:45 +02:00
prepared_query_index_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
prepared_query_test.go Add agent.segment interpolation to prepared queries 2017-08-30 11:58:29 -07:00
schema.go Creates a registration mechanism for schemas. 2017-11-29 18:36:52 -08:00
schema_test.go pkg refactor 2017-06-10 18:52:45 +02:00
session.go Creates a registration mechanism for schemas. 2017-11-29 18:36:52 -08:00
session_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
state_store.go agent/consul/state: CARoot structs and initial state store 2018-06-14 09:41:49 -07:00
state_store_test.go [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
tombstone_gc.go Sheds monotonic time info so tombstone GC bins work properly. 2017-11-29 10:34:24 -08:00
tombstone_gc_test.go Sheds monotonic time info so tombstone GC bins work properly. 2017-11-29 10:34:24 -08:00
txn.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
txn_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00