open-consul/agent/structs
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 agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
acl_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
catalog.go agent: remove ConnectProxyServiceName 2018-06-14 09:41:49 -07:00
check_definition.go agent/config: support configuring alias check 2018-07-12 09:36:10 -07:00
check_definition_test.go Remove the script field from checks in favor of args 2018-05-08 15:31:53 -07:00
check_type.go agent/structs: check is alias if node is empty 2018-07-12 09:36:11 -07:00
connect.go Proxy Config Manager (#4729) 2018-10-10 16:55:34 +01:00
connect_ca.go connect: add ExternalTrustDomain to CARoot fields 2018-10-10 12:16:47 -07:00
connect_ca_test.go Fix CA pruning when CA config uses string durations. (#4669) 2018-09-13 15:43:00 +01:00
connect_proxy_config.go Proxy Config Manager (#4729) 2018-10-10 16:55:34 +01:00
connect_proxy_config_test.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
connect_test.go Added connect proxy config and local agent state setup on boot. 2018-06-14 09:41:57 -07:00
errors.go Makes RPC handling more robust when rolling servers. (#3561) 2017-10-10 15:19:50 -07:00
intention.go Fix some tests failures caused by the sorting change and some cuased by previous UpdatePrecedence() change 2018-06-25 12:25:13 -07:00
intention_test.go agent/consul: set precedence value on struct itself 2018-06-25 12:24:16 -07:00
operator.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
prepared_query.go Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
prepared_query_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
service_definition.go merge feedback: fix typos; actually use deliverLatest added previously but not plumbed in 2018-10-10 16:55:34 +01:00
service_definition_test.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
snapshot.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
structs.go [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
structs_test.go [Performance On Large clusters] Reduce updates on large services (#4720) 2018-10-11 12:42:39 +01:00
testing_catalog.go Add SidecarService Syntax sugar to Service Definition (#4686) 2018-10-10 16:55:34 +01:00
testing_connect_proxy_config.go Add -sidecar-for and new /agent/service/:service_id endpoint (#4691) 2018-10-10 16:55:34 +01:00
testing_intention.go agent: use testing intention to get valid intentions 2018-06-14 09:41:43 -07:00
testing_service_definition.go Add Proxy Upstreams to Service Definition (#4639) 2018-10-10 16:55:34 +01:00
txn.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00