Is there a way, preferable in the Python SDK, but also just generally with any SDK/language or even just over plain HTTPS, to automatically connect to the closest region (by latency or some other metric) of a geo-replicated Azure Cosmos DB?
You can set the preferred_locations, but ideally I would like my app to automatically discover which region is the closest and connect to that (and fail over to another one if needed).
To update on this: The missing feature/switch is called ApplicationRegion
which is already present in the .NET SDK. There is now a feature request on GitHub to add this to the Python SDK as well: https://github.com/Azure/azure-sdk-for-python/issues/15685