Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

Fixing region fail over issue for direct tcp calls #351

Closed simplynaveen20 closed 4 years ago

simplynaveen20 commented 4 years ago

Currently for tcp network exception we are doing region failover, which is causing problem for some users where due to some intermittent network issue on BE nodes sdk is sending traffic for next 5 min to other available region.

This PR will limit the region failover only in case of http network failure.

kushagraThapar commented 4 years ago

Discussed the above comments with @simplynaveen20 offline. Good to go from my side.

simplynaveen20 commented 4 years ago

looks good to me thanks Naveen.

Once scenario we haven't covered is when address resolution request to GW fails. This will cause a region failover, but instead we should be more lenient toward GW address all and not fail over the region.

Yes as discussed , its not only address resolution, we need to think and change region fail over for all GW calls.