parveensania commented on PR #37840:
URL: https://github.com/apache/beam/pull/37840#issuecomment-4087247554

   > When looking for similar implementations, I came across 
GcpMultiEndpointChannel 
https://github.com/GoogleCloudPlatform/grpc-gcp-java/blob/master/grpc-gcp/src/main/java/com/google/cloud/grpc/GcpMultiEndpointChannel.java
   > 
   > GcpMultiEndpointChannel uses the channel ConnectivityStatus to determine 
which channel to use. Will it be more robust, if FailoverChannel uses 
ConnectivityStatus instead if RPC status to failover?
   > 
   > Thinking something like wait X seconds for primary to become ready the 
first time and failover to the fallback channel if it takes more than X 
minutes. We can let primary retry connections in the background and switch to 
it whenever it becomes ready.
   
   I went for a hybrid approach, check both connection state + RPC status. 
ConnectionState could be transient errors, so we move back to primary as soon 
as state changes to READY. RPC status can capture server side issues too, like 
backend not responding (for instance requests getting rejected by security 
policies, there could be other reasons too). For this I've used longer cooling 
period before we re-try primary. WDYT? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to