Skip to content

Commit 4a83bf9

Browse files
authored
ringhash: enable behaviors of A76 by default (#8922)
Those features have been gated by environment variables since 1.73.0, and used in production at Datadog. They can be considered stable. Change the defaults to enable using EDS `hash_key` lb metadata and `requestHashHeader` LB config field. RELEASE NOTES: - ringhash: Enable A76 ring hash improvements by default: EDS endpoint hash key parsing from LbEndpoint metadata and request hash header support via the "requestHashHeader" field. The previous behavior can be restored by setting GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT=true or GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY=false.
1 parent ace972d commit 4a83bf9

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

internal/envconfig/envconfig.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,16 @@ var (
5454

5555
// XDSEndpointHashKeyBackwardCompat controls the parsing of the endpoint hash
5656
// key from EDS LbEndpoint metadata. Endpoint hash keys can be disabled by
57-
// setting "GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT" to "true". When the
58-
// implementation of A76 is stable, we will flip the default value to false
59-
// in a subsequent release. A final release will remove this environment
60-
// variable, enabling the new behavior unconditionally.
61-
XDSEndpointHashKeyBackwardCompat = boolFromEnv("GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT", true)
57+
// setting "GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT" to "true". A future
58+
// release will remove this environment variable, enabling the new behavior
59+
// unconditionally.
60+
XDSEndpointHashKeyBackwardCompat = boolFromEnv("GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT", false)
6261

6362
// RingHashSetRequestHashKey is set if the ring hash balancer can get the
6463
// request hash header by setting the "requestHashHeader" field, according
65-
// to gRFC A76. It can be enabled by setting the environment variable
66-
// "GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY" to "true".
67-
RingHashSetRequestHashKey = boolFromEnv("GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY", false)
64+
// to gRFC A76. It can be disabled by setting the environment variable
65+
// "GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY" to "false".
66+
RingHashSetRequestHashKey = boolFromEnv("GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY", true)
6867

6968
// ALTSHandshakerKeepaliveParams is set if we should add the
7069
// KeepaliveParams when dial the ALTS handshaker service.

0 commit comments

Comments
 (0)