Hello everyone,

We are trying to setup routing via XDS to our GRPC services. Routing should 
be based on `node.cluster` information provided from client.

Basically we would like to have 2 groups of GRPC clusters (priority and 
normal) with same endpoints and choose right one by client `node.cluster` 
identification.

I have very minimal setup [1] which works absolutely as we expected for 
java client but doesn't work for C++ (and grpc_cli). Node hashing 
implementation [2]. This is minimal setup to reproducing this behaviour, 
regular routing is more complicated.

>From log perspective it looks like from C++ xds server receive 
`node.cluster` information just in first request. 

>From java I see cluster in all requests:
grpc-default-executor-0] INFO org.example.xds.routing.XdsServer - Routing 
[priority] to priority group. [grpc-default-executor-1] INFO 
org.example.xds.routing.XdsServer - Routing [priority] to priority group. 
[grpc-default-executor-1] INFO org.example.xds.routing.XdsServer - Routing 
[priority] to priority group. [grpc-default-executor-0] INFO 
org.example.xds.routing.XdsServer - Routing [priority] to priority group. 
[grpc-default-executor-1] INFO org.example.xds.routing.XdsServer - Routing 
[priority] to priority group. [grpc-default-executor-2] INFO 
org.example.xds.routing.XdsServer - Routing [priority] to priority group. 
[grpc-default-executor-1] INFO org.example.xds.routing.XdsServer - Routing 
[priority] to priority group. [grpc-default-executor-2] INFO 
org.example.xds.routing.XdsServer - Routing [priority] to priority group.

But from cli / c++ I see cluster just in first request:
[grpc-default-executor-0] INFO org.example.xds.routing.XdsServer - Routing 
[priority] to priority group. [grpc-default-executor-0] INFO 
org.example.xds.routing.XdsServer - Routing [] to normal group. 
[grpc-default-executor-0] INFO org.example.xds.routing.XdsServer - Routing 
[] to normal group.

This leads to expected error when c++ client is trying to get priority 
listeners and routes from default group.

Can somebody give me any hint what's wrong here?

Thanks a lot!

L.

[1] https://github.com/LesTR/xds-routing-test
[2] 
https://github.com/LesTR/xds-routing-test/blob/master/src/main/java/org/example/xds/routing/XdsServer.java#L61

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/1de7e140-862f-414f-b25a-7b1afc4069can%40googlegroups.com.

Reply via email to