Say I have a client (a business, not a consumer) in US, for whom I set up a specific webserver + database instance in US. Only this db instance has this client's details. And suppose I have a client in the middle east, for whom I set up a specific webserver + database instance in Singapore. Only this client's details is stored in the Singapore server. And, the webservers are not stateless. That is, they hold the user login in their own redis instances (again, 2 redis instances corresponding to Singapore & US). Let's say my domain name is my-domain.com. Let's say the middle-east user goes to my-domain.com. Logs in to see that his login failed because he's accessing the US server where his credentials aren't there. And, the loadbalancer doesn't really know he's the middle-east user until his log in passes. I suppose the middle-east user could be accessing my-domain.com from US, for which the geoDNS would direct him to the US server. Right? What's the solution for this? And how do the big shots like amazon & google handle this?
customername.example.com
subdomains and direct them to them.