在 Haproxy 上使用 GeoIP
如何连接数据库geoip Haproxy?
一个例子。 Haproxy 决定 ip 国家和城市,并修改 http 标头以传输到后端:
reqadd X-Country:\ Country
How do I connect to the database geoip Haproxy?
an example.
Haproxy decides at ip country and city, and modifies http headers for transmission to the backends:
reqadd X-Country:\ Country
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你想要的是你应该在动态dns中寻找的东西,比如route53,它可以检测ip并路由到最近的负载均衡器。但是,您可以在 haproxy 中设置 acl 请求。更多信息请参见手册页第 7 节: http://haproxy.1wt.eu/下载/1.5/doc/configuration.txt
I think what you want is something you should look for in a dynamic dns, like route53 where it can detect the ip and route to the closest load balancer. You can however setup acl requests in haproxy. More in section 7 of the man pages: http://haproxy.1wt.eu/download/1.5/doc/configuration.txt