如何路由流量由接近从路线53到最接近NGINX服务器?
问题描述:
我试图建立在以下方式的Web服务器堆栈:
I'm trying to set up a web server stack in the following way:
- 使用路由53为我的DNS
- 从S3桶提供静态内容的CloudFlare
- 路线API调用,它位于一些Nodejs服务器前最近NGINX服务器。
因此,所有的静态内容很容易做得不够,但我怎么能路由我的API流量到最近的NGINX服务器,这取决于位置?
So all static content is done easily enough but how can I route my api traffic to the nearest NGINX server depending on location?
答
您想要地理位置路由的API端点:
you want geolocation routing for the api endpoints:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-geo