The data of each customer only exist in one of several global datacenters, that all answer to the same hostname (ex. api.company.com)
Only a single domain for all customers globally
I want to make sure that all global customers only have to use a single domain: api.company.com to access their data, and not something like api-region3.company.com, but it may not be possible.
GEO Location DNS may go to wrong datacenter
I cannot use geo-location DNS directly, because that would mean that someone might end up accessing a datacenter that does not contain the data for that customer.
Possible solution
I could use a proxy at each of the datacenters to relay the request to the correct datacenter, based on some information in the request, but I'm not sure if there's some better established industry standard way of doing this, without duplicating the data across all datacenters. In case proxying/relaying is the best option, what is some tried-and-tested options for actually setting this up?