From 97eb424ca8ef3695d7651dbf9a704aa56a64a703 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 19 Aug 2022 01:14:44 +0000 Subject: [PATCH 1/3] A42 update: specify that channel_id should be initialized with a random number --- A42-xds-ring-hash-lb-policy.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/A42-xds-ring-hash-lb-policy.md b/A42-xds-ring-hash-lb-policy.md index 88ec463f3..89d5bd81e 100644 --- a/A42-xds-ring-hash-lb-policy.md +++ b/A42-xds-ring-hash-lb-policy.md @@ -97,7 +97,10 @@ Here is how gRPC will handle each type of hash policy: (Note that we do not recommend that applications create multiple gRPC channels to the same virtual host, but if you do that, then the behavior here will not be exactly the same as using `connection_properties`, - because each channel may use a different endpoint.) + because each channel may use a different endpoint.). In order to facilitate + an even selection of backends across different channels running in different + processes or machines, the value of `io.grpc.channel_id` should be + initialized with a uniform random number. #### XdsClient Changes From fb839557b8b01d663bfc5197338bab489561314c Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 19 Aug 2022 15:05:04 +0000 Subject: [PATCH 2/3] improve wording --- A42-xds-ring-hash-lb-policy.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/A42-xds-ring-hash-lb-policy.md b/A42-xds-ring-hash-lb-policy.md index 89d5bd81e..aa0ec8f2a 100644 --- a/A42-xds-ring-hash-lb-policy.md +++ b/A42-xds-ring-hash-lb-policy.md @@ -92,15 +92,15 @@ Here is how gRPC will handle each type of hash policy: the way that Envoy does. However, we will support one special filter state [`key`](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/route/v3/route_components.proto#L703) called `io.grpc.channel_id`, which will hash to the same value for all - requests on a given gRPC channel. This can be used in similar situations - to where Envoy uses `connection_properties` to hash on the source IP address. - (Note that we do not recommend that applications create multiple gRPC - channels to the same virtual host, but if you do that, then the - behavior here will not be exactly the same as using `connection_properties`, - because each channel may use a different endpoint.). In order to facilitate - an even selection of backends across different channels running in different - processes or machines, the value of `io.grpc.channel_id` should be - initialized with a uniform random number. + requests on a given gRPC channel. In order to facilitate an even selection + of backends across different channels (which may or may not be in the same + process or machine), the value of `io.grpc.channel_id` should be initialized + with a uniform random number. This can be used in similar situations to where + Envoy uses `connection_properties` to hash on the source IP address. (Note + that we do not recommend that applications create multiple gRPC channels to + the same virtual host, but if you do that, then the behavior here will not be + exactly the same as using `connection_properties`, because each channel + may use a different endpoint.) #### XdsClient Changes From 31b44648549acaae93f4c6646fa3fc450555fbf2 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 19 Aug 2022 20:02:54 +0000 Subject: [PATCH 3/3] improve wording --- A42-xds-ring-hash-lb-policy.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/A42-xds-ring-hash-lb-policy.md b/A42-xds-ring-hash-lb-policy.md index aa0ec8f2a..ee50ac280 100644 --- a/A42-xds-ring-hash-lb-policy.md +++ b/A42-xds-ring-hash-lb-policy.md @@ -95,12 +95,12 @@ Here is how gRPC will handle each type of hash policy: requests on a given gRPC channel. In order to facilitate an even selection of backends across different channels (which may or may not be in the same process or machine), the value of `io.grpc.channel_id` should be initialized - with a uniform random number. This can be used in similar situations to where - Envoy uses `connection_properties` to hash on the source IP address. (Note - that we do not recommend that applications create multiple gRPC channels to - the same virtual host, but if you do that, then the behavior here will not be - exactly the same as using `connection_properties`, because each channel - may use a different endpoint.) + with a random number from a uniform distribution. This can be used in similar + situations to where Envoy uses `connection_properties` to hash on the source + IP address. (Note that we do not recommend that applications create multiple + gRPC channels to the same virtual host, but if you do that, then the behavior + here will not be exactly the same as using `connection_properties`, because + each channel may use a different endpoint.) #### XdsClient Changes