open-consul/agent/consul/state
Dan Upton 9fe6c33c0d
xDS Load Balancing (#14397)
Prior to #13244, connect proxies and gateways could only be configured by an
xDS session served by the local client agent.

In an upcoming release, it will be possible to deploy a Consul service mesh
without client agents. In this model, xDS sessions will be handled by the
servers themselves, which necessitates load-balancing to prevent a single
server from receiving a disproportionate amount of load and becoming
overwhelmed.

This introduces a simple form of load-balancing where Consul will attempt to
achieve an even spread of load (xDS sessions) between all healthy servers.
It does so by implementing a concurrent session limiter (limiter.SessionLimiter)
and adjusting the limit according to autopilot state and proxy service
registrations in the catalog.

If a server is already over capacity (i.e. the session limit is lowered),
Consul will begin draining sessions to rebalance the load. This will result
in the client receiving a `RESOURCE_EXHAUSTED` status code. It is the client's
responsibility to observe this response and reconnect to a different server.

Users of the gRPC client connection brokered by the
consul-server-connection-manager library will get this for free.

The rate at which Consul will drain sessions to rebalance load is scaled
dynamically based on the number of proxies in the catalog.
2022-09-09 15:02:01 +01:00
..
acl.go
acl_events.go
acl_events_test.go
acl_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
acl_oss_test.go
acl_schema.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
acl_test.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
autopilot.go
autopilot_test.go
catalog.go Merge branch 'main' into catalog-service-list-filter 2022-08-26 11:16:06 -04:00
catalog_events.go proxycfg-glue: server-local implementation of `ServiceList` 2022-07-14 18:22:12 +01:00
catalog_events_oss.go
catalog_events_oss_test.go
catalog_events_test.go feat: convert destination address to slice 2022-07-25 12:31:58 -04:00
catalog_oss.go Add internal endpoint to fetch peered upstream candidates from VirtualIP table (#13642) 2022-06-29 16:34:58 -04:00
catalog_oss_test.go Rename peering internal to ~ 2022-07-21 10:51:05 -07:00
catalog_schema.go Add internal endpoint to fetch peered upstream candidates from VirtualIP table (#13642) 2022-06-29 16:34:58 -04:00
catalog_test.go Merge branch 'main' into catalog-service-list-filter 2022-08-26 11:16:06 -04:00
config_entry.go Add some extra handling for destination deletes 2022-08-08 11:38:13 -07:00
config_entry_events.go proxycfg: server-local intentions data source 2022-07-04 10:48:36 +01:00
config_entry_events_test.go proxycfg: server-local intentions data source 2022-07-04 10:48:36 +01:00
config_entry_intention.go peering, state: account for peer intentions (#13443) 2022-06-16 10:27:31 -07:00
config_entry_intention_oss.go
config_entry_oss.go
config_entry_oss_test.go Update assumptions around exported-service config 2022-06-01 17:03:51 -06:00
config_entry_schema.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
config_entry_test.go Add some extra handling for destination deletes 2022-08-08 11:38:13 -07:00
connect_ca.go
connect_ca_events.go
connect_ca_events_test.go
connect_ca_test.go
coordinate.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
coordinate_oss.go
coordinate_oss_test.go
coordinate_test.go
delay_oss.go
delay_test.go
events.go proxycfg-glue: server-local implementation of `ServiceList` 2022-07-14 18:22:12 +01:00
federation_state.go
graveyard.go
graveyard_oss.go
graveyard_test.go
index_connect_test.go
indexer.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
intention.go Egress gtw/intention rpc endpoint (#13354) 2022-06-07 15:55:02 -04:00
intention_oss.go
intention_test.go peering, state: account for peer intentions (#13443) 2022-06-16 10:27:31 -07:00
kvs.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
kvs_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
kvs_oss_test.go
kvs_test.go
memdb.go proxycfg-glue: server-local implementation of `ServiceList` 2022-07-14 18:22:12 +01:00
operations_oss.go
peering.go Add validation to prevent switching dialing mode 2022-08-29 12:31:13 -06:00
peering_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
peering_oss_test.go Update peering state and RPC for deferred deletion 2022-06-13 12:10:32 -06:00
peering_test.go Add validation to prevent switching dialing mode 2022-08-29 12:31:13 -06:00
prepared_query.go
prepared_query_index.go
prepared_query_index_test.go
prepared_query_test.go
query.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
query_oss.go Add internal endpoint to fetch peered upstream candidates from VirtualIP table (#13642) 2022-06-29 16:34:58 -04:00
schema.go Implement/Utilize secrets for Peering Replication Stream (#13977) 2022-08-01 10:33:18 -04:00
schema_oss.go
schema_oss_test.go
schema_test.go Implement/Utilize secrets for Peering Replication Stream (#13977) 2022-08-01 10:33:18 -04:00
session.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
session_oss.go Make memdb indexers generic (#13558) 2022-06-23 11:07:19 -04:00
session_test.go
state_store.go Add per-node max indexes (#12399) 2022-06-23 11:13:25 -04:00
state_store_oss_test.go
state_store_test.go Add support for filtering the 'List Services' API 2022-08-10 16:52:32 -05:00
store_integration_test.go proxycfg: server-local config entry data sources 2022-07-04 10:48:36 +01:00
system_metadata.go
system_metadata_test.go
tombstone_gc.go
tombstone_gc_test.go
txn.go Add kv txn get-not-exists operation. 2022-09-06 10:28:59 -05:00
txn_test.go Add kv txn get-not-exists operation. 2022-09-06 10:28:59 -05:00
usage.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
usage_oss.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
usage_test.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00