问题原文
原帖链接 · Alex · CC BY-SA 3.0
I have a web site. It is designed for two target groups of users: one from Eastern Europe, second - from USA. I also have two hosting accounts - one in USA and one in Europe.
I'd like to route the traffic in such a way that visitors from USA are pointed to hosting server in USA, while visitors from Europe are pionted to server in Europe. Is it possible to configure my DNS server (or whatever...) and how can it be done?
社区高分解答
原帖链接 · thahostingadmin · CC BY-SA 4.0
You can do this with DNS if you use a service such as Route53: DNS GeoProximity Trafic Routing
If you wanted to setup your own DNS server to do this kind of thing you could look into technologies such as GeoDNS with BIND.
A different approach would be to use load balancing software such as HAProxy to geolocate the user, and then pass the traffic to your desired server: GeoIP with HAProxy
With the HAProxy approach, you would update your DNS to send all traffic to your HAProxy server, and then it would route traffic to and from the appropriate regional backend server. This might not be as efficient as you'd hope because your HAProxy server is not necessarily going to be in the same geographical region as your user.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
