open-consul/agent/consul
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
..
auth acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
authmethod Extract AWS auth implementation out of Consul (#13760) 2022-07-19 16:26:44 -05:00
autopilotevents xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
discoverychain Update the structs and discovery chain for service resolver redirects to cluster peers. (#14366) 2022-08-29 09:51:32 -04:00
fsm Handle breaking change for ServiceVirtualIP restore (#14149) 2022-08-11 14:47:10 -04:00
prepared_query Add Cluster Peering Failover Support to Prepared Queries (#13835) 2022-07-22 09:14:43 -04:00
state xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
stream proxycfg: server-local config entry data sources 2022-07-04 10:48:36 +01:00
testdata ca: examine the full chain in newCARoot 2022-02-17 18:21:30 -05:00
usagemetrics xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
wanfed
watch test: update mockery use to put mocks into test files (#13656) 2022-07-05 16:57:15 -05:00
xdscapacity xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
acl.go proxycfg: server-local intention upstreams data source 2022-07-04 10:48:36 +01:00
acl_authmethod.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_authmethod_oss.go
acl_client.go Merge pull request #12165 from hashicorp/dnephin/acl-resolve-token 2022-01-31 13:27:49 -05:00
acl_endpoint.go proxycfg: server-local intention upstreams data source 2022-07-04 10:48:36 +01:00
acl_endpoint_legacy.go
acl_endpoint_oss.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_endpoint_test.go proxycfg: server-local intention upstreams data source 2022-07-04 10:48:36 +01:00
acl_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
acl_oss_test.go
acl_replication.go
acl_replication_test.go proxycfg: server-local intention upstreams data source 2022-07-04 10:48:36 +01:00
acl_replication_types.go proxycfg: server-local intention upstreams data source 2022-07-04 10:48:36 +01:00
acl_server.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_server_oss.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_test.go proxycfg: server-local intention upstreams data source 2022-07-04 10:48:36 +01:00
acl_token_exp.go acl: gRPC login and logout endpoints (#12935) 2022-05-04 17:38:45 +01:00
acl_token_exp_test.go [OSS] Remove remaining references to master (#11827) 2022-01-20 12:47:50 +00:00
auto_config_backend.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
auto_config_backend_test.go [OSS] Remove remaining references to master (#11827) 2022-01-20 12:47:50 +00:00
auto_config_endpoint.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
auto_config_endpoint_test.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
auto_encrypt_endpoint.go
auto_encrypt_endpoint_test.go Support per-listener TLS configuration ⚙️ (#12504) 2022-03-18 10:46:58 +00:00
autopilot.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
autopilot_oss.go
autopilot_test.go Add event generation for autopilot state updates (#12626) 2022-04-19 13:03:03 -04:00
catalog_endpoint.go Add support for filtering the 'List Services' API 2022-08-10 16:52:32 -05:00
catalog_endpoint_test.go Add support for filtering the 'List Services' API 2022-08-10 16:52:32 -05:00
client.go Add timeout to Client RPC calls (#11500) 2022-04-21 16:21:35 -04:00
client_serf.go fix: missing segment and partition (#14194) 2022-08-12 15:21:39 -04:00
client_test.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
cluster_test.go Vendor in rpc mono repo for net/rpc fork, go-msgpack, msgpackrpc. (#12311) 2022-02-14 09:45:45 -08:00
config.go Expose `grpc_tls` via serf for cluster peering. 2022-08-29 13:43:49 -05:00
config_endpoint.go proxycfg-glue: server-local implementation of ResolvedServiceConfig 2022-09-06 23:27:25 +01:00
config_endpoint_test.go Add additional parameters to envoy passive health check config (#14238) 2022-09-01 09:59:11 -07:00
config_oss.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
config_replication.go [sync oss] add net/rpc interceptor implementation (#12573) 2022-03-17 16:02:26 -07:00
config_replication_test.go server: partly fix config entry replication issue that prevents replication in some circumstances (#12307) 2022-02-23 17:27:48 -06:00
config_test.go
connect_ca_endpoint.go ConnectCA.Sign gRPC Endpoint (#12787) 2022-04-14 14:26:14 +01:00
connect_ca_endpoint_test.go add general runstep test helper instead of copying it all over the place (#13013) 2022-05-10 15:25:51 -05:00
coordinate_endpoint.go Bulk acl message fixup oss (#12470) 2022-03-10 18:48:27 -08:00
coordinate_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
discovery_chain_endpoint.go Bulk acl message fixup oss (#12470) 2022-03-10 18:48:27 -08:00
discovery_chain_endpoint_test.go Cluster peering failover disco chain changes (#14296) 2022-08-23 09:13:43 -04:00
enterprise_client_oss.go
enterprise_config_oss.go
enterprise_server_oss.go Add leader routine to clean up peerings 2022-06-14 15:36:50 -06:00
enterprise_server_oss_test.go
federation_state_endpoint.go Bulk acl message fixup oss (#12470) 2022-03-10 18:48:27 -08:00
federation_state_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
federation_state_replication.go [sync oss] add net/rpc interceptor implementation (#12573) 2022-03-17 16:02:26 -07:00
federation_state_replication_test.go
filter.go
filter_test.go
flood.go
gateway_locator.go rpc: improve docs for blockingQuery 2022-02-15 14:20:14 -05:00
gateway_locator_test.go rpc: improve docs for blockingQuery 2022-02-15 14:20:14 -05:00
grpc_integration_test.go grpc: rename public/private directories to external/internal (#13721) 2022-07-13 16:33:48 +01:00
health_endpoint.go Add support for merge-central-config query param (#13001) 2022-05-25 13:20:17 -07:00
health_endpoint_test.go block PeerName register requests (#13887) 2022-07-29 14:36:22 -07:00
helper_test.go Retry checks for virtual IP metadata 2022-07-27 13:54:34 -04:00
intention_endpoint.go peering: block Intention.Apply ops (#13451) 2022-06-16 12:07:28 -07:00
intention_endpoint_test.go peering: block Intention.Apply ops (#13451) 2022-06-16 12:07:28 -07:00
internal_endpoint.go Add Internal.ServiceDump support for querying by PeerName 2022-09-01 10:32:59 -04:00
internal_endpoint_test.go Implement/Utilize secrets for Peering Replication Stream (#13977) 2022-08-01 10:33:18 -04:00
issue_test.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
kvs_endpoint.go Add kv txn get-not-exists operation. 2022-09-06 10:28:59 -05:00
kvs_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
leader.go Change serf-tag references to field references. 2022-08-31 16:38:42 -05:00
leader_connect.go Add virtual IP generation for term gateway backed services 2022-01-12 12:08:49 -08:00
leader_connect_ca.go Add SpiffeID for Consul server agents (#14485) 2022-09-06 17:58:13 -06:00
leader_connect_ca_test.go Add SpiffeID for Consul server agents (#14485) 2022-09-06 17:58:13 -06:00
leader_connect_test.go Prune old expired intermediate certs when appending a new one 2022-08-31 11:41:58 -07:00
leader_federation_state_ae.go peering: initial sync (#12842) 2022-04-21 17:34:40 -05:00
leader_federation_state_ae_test.go
leader_intentions.go [sync oss] add net/rpc interceptor implementation (#12573) 2022-03-17 16:02:26 -07:00
leader_intentions_oss.go
leader_intentions_oss_test.go
leader_intentions_test.go configentry: make a new package to hold shared config entry structs that aren't used for RPC or the FSM (#12384) 2022-02-22 10:36:36 -06:00
leader_metrics.go ca: use the new leaf signing lookup func in leader metrics 2022-01-06 16:55:49 -05:00
leader_oss_test.go
leader_peering.go Add heartbeat timeout grace period when accounting for peering health 2022-08-29 16:32:26 -04:00
leader_peering_test.go Address PR comments. 2022-09-01 16:54:24 -05:00
leader_test.go Address PR comments. 2022-09-01 16:54:24 -05:00
logging.go
logging_test.go bulk rewrite using this script 2022-01-20 10:46:23 -06:00
merge.go catalog: compare node names case insensitively in more places (#12444) 2022-02-24 16:54:47 -06:00
merge_oss.go
merge_oss_test.go
merge_service_config.go proxycfg-glue: server-local implementation of ResolvedServiceConfig 2022-09-06 23:27:25 +01:00
merge_service_config_test.go proxycfg-glue: server-local implementation of ResolvedServiceConfig 2022-09-06 23:27:25 +01:00
merge_test.go catalog: compare node names case insensitively in more places (#12444) 2022-02-24 16:54:47 -06:00
operator_autopilot_endpoint.go Enable running autopilot state updates on all servers (#12617) 2022-04-07 10:48:48 -04:00
operator_autopilot_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
operator_endpoint.go
operator_raft_endpoint.go Bulk acl message fixup oss (#12470) 2022-03-10 18:48:27 -08:00
operator_raft_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
options.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
options_oss.go
peering_backend.go Expose `grpc_tls` via serf for cluster peering. 2022-08-29 13:43:49 -05:00
peering_backend_oss.go peering: move peer replication to the external gRPC port (#13698) 2022-07-08 12:01:13 -05:00
peering_backend_oss_test.go Add ACL enforcement to peering endpoints 2022-07-25 09:34:29 -06:00
peering_backend_test.go Add test to verify forwarding 2022-08-11 11:16:02 -04:00
prepared_query_endpoint.go Add Cluster Peering Failover Support to Prepared Queries (#13835) 2022-07-22 09:14:43 -04:00
prepared_query_endpoint_test.go Implement/Utilize secrets for Peering Replication Stream (#13977) 2022-08-01 10:33:18 -04:00
raft_rpc.go
replication.go Apply suggestions from code review 2022-01-26 12:24:13 -05:00
replication_test.go
rpc.go [sync oss] add net/rpc interceptor implementation (#12573) 2022-03-17 16:02:26 -07:00
rpc_test.go grpc: rename public/private directories to external/internal (#13721) 2022-07-13 16:33:48 +01:00
rtt.go
rtt_test.go Vendor in rpc mono repo for net/rpc fork, go-msgpack, msgpackrpc. (#12311) 2022-02-14 09:45:45 -08:00
segment_oss.go
serf_filter.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
serf_test.go
server.go xDS Load Balancing (#14397) 2022-09-09 15:02:01 +01:00
server_connect.go Configure upstream TLS context with peer root certs (#13321) 2022-06-01 15:53:52 -06:00
server_lookup.go
server_lookup_test.go
server_oss.go feat(telemetry): add labels to serf and memberlist metrics (#14161) 2022-08-11 22:09:56 -04:00
server_overview.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
server_overview_test.go oss: Add overview UI internal endpoint 2022-03-22 17:05:09 -07:00
server_register.go Add support for merge-central-config query param (#13001) 2022-05-25 13:20:17 -07:00
server_serf.go Expose `grpc_tls` via serf for cluster peering. 2022-08-29 13:43:49 -05:00
server_test.go Address PR comments. 2022-09-01 16:54:24 -05:00
session_endpoint.go Bulk acl message fixup oss (#12470) 2022-03-10 18:48:27 -08:00
session_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
session_timers.go
session_timers_test.go
session_ttl.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
session_ttl_test.go Vendor in rpc mono repo for net/rpc fork, go-msgpack, msgpackrpc. (#12311) 2022-02-14 09:45:45 -08:00
snapshot_endpoint.go Bulk acl message fixup oss (#12470) 2022-03-10 18:48:27 -08:00
snapshot_endpoint_test.go Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
stats_fetcher.go introduce EmptyReadRequest for status_endpoint (#12653) 2022-03-29 18:05:45 -07:00
stats_fetcher_test.go
status_endpoint.go introduce EmptyReadRequest for status_endpoint (#12653) 2022-03-29 18:05:45 -07:00
status_endpoint_test.go Support per-listener TLS configuration ⚙️ (#12504) 2022-03-18 10:46:58 +00:00
subscribe_backend.go grpc: rename public/private directories to external/internal (#13721) 2022-07-13 16:33:48 +01:00
subscribe_backend_test.go grpc: rename public/private directories to external/internal (#13721) 2022-07-13 16:33:48 +01:00
system_metadata.go [sync oss] add net/rpc interceptor implementation (#12573) 2022-03-17 16:02:26 -07:00
system_metadata_test.go
txn_endpoint.go Move ACLResolveResult into acl/resolver package (#13467) 2022-06-17 10:24:43 +01:00
txn_endpoint_test.go Enable servers to configure arbitrary proxies from the catalog (#13244) 2022-05-27 12:38:52 +01:00
util.go catalog: compare node names case insensitively in more places (#12444) 2022-02-24 16:54:47 -06:00
util_test.go