Is there a way to localize dns entries? Meaning, that users from asia resolve mydomain.com to another ip than users from usa or europe. This would be helpful to give the users the server nearby. DNS is the only technique used so far, meaning I cannot place some softwarerouting or central system replacing the dns to solve this.
Yes, there are currently two popular solutions to this problem.
The first is called
You can read more about it here http://en.wikipedia.org/wiki/Anycast
The second technique again involves AnyCast, however this time, the IP address range being anycasted referes to our name servers themselves. As the nameservers will only requests from clients who they are closest too (as determined by the magic of BGP), they can themselves return IP addresses that are logically local to the client.
An example of this is google's l.google.com domain
From a host in Australia
From a host in the US
So, the CNAME for
If you only want to localise servers for Asia, North America and Europe, then you could decide to run both your webapp and your DNS yourself.
With DNS, you could use something like the Split-Horizon DNS approach, which could either be achieved through integrated functionality of your DNS server (they may call it GeoDNS), or through a firewall that would redirect different IP-address ranges to different running instances of your DNS server (you could run several different copies of the server on your local machine, which will listen at different local IP-addresses).
You could probably get expected results in ≈90% of cases by replying to DNS requests from RIPE and AfriNIC IP-addresses with an
(And, yes, there should be a way to make these things easier, but, so far, it seems like there is none.)