I'm trying to set up a web server stack in the following way:
- Use Route 53 for my DNS
- Serve static content with Cloudflare from S3 buckets
- Route API calls to nearest NGINX server that sits in front of some Nodejs servers.
So all static content is done easily enough but how can I route my api traffic to the nearest NGINX server depending on location?
you want geolocation routing for the api endpoints:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-geo