大网数据广告活动
网站运营与故障问答

How can I route traffic between two hosting servers?

· 52CE 我爱测

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 vis…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2013-02-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。