0

I'm trying to design a highly available API. I'd like to deploy the API to multiple regions to increase reliability, but to have a single URL so that clients don't have to use multiple URLs. I'm not concerned with geographic routing.

I'd like to setup APIGateway deployed to multiple regions with a single endpoint. My requirements are quick failover and availability.

Two ways I can think of doing this is either use Route53 to map a single endpoint to regional APIGateway DNS names with failover.

The other option is to use AWS Global Accelerator anycast service with ALBs pointing to the API Gateway. Given that DNS entires can be cached by browsers, clients etc is Global accelerator/anycast a better option?

Tim
  • 31,888
  • 7
  • 52
  • 78
marti H
  • 1
  • 1
  • Can you please confirm that what you're trying to do is deploy an API to multiple regions but have a single URL for it? If so I suggest you edit the language of your question slightly to make it really clear. – Tim Jan 08 '22 at 08:38
  • @tim Updated the language – marti H Jan 10 '22 at 18:58
  • Unusual requirement, I'm curious why you want to do that. Giving more detail means people can help solve the problem, rather than just answering the question you have. I've never considered how to do this, it'd take a bit of thinking. – Tim Jan 10 '22 at 19:54
  • The reason to do this is so that clients of the endpoint don't need to be aware of multiple API endpoint. It's transparent to them. I can design the service to have better availability by building in multiple regions and have an active-active style failover mode. – marti H Jan 10 '22 at 20:19
  • What is your workload behind the API gateway? Lambda, EC2 instances, etc? Is it low or high volume? – Tim Jan 10 '22 at 22:43

1 Answers1

0

API Gateway deployments are generally pay per request, so deploying to multiple regions shouldn't cost anything extra. If your back end is lambda that's also pay per use, but if the back end is EC2 or similar that can be more expensive to have multiple regions.

My initial design wouldn't include multi-region unless you've already experienced multiple failures in a single region or you need extremely high reliability - four or five nines. Human error is more likely to break your systems than AWS outages.

API gateways are redundant and reliable, and while AWS does fail it's not all that often, and when it does so many websites are down you're in good company. Not ideal if you have a tight SLA though.

If I did need high availability / multiple regions I would deploy the gateway and workload to multiple regions, then first look to use Route53 to provide a single URL for those those APIs. With R53 you can use any routing you like geolocation, latency, or failover. If the back end is expensive you could look at a cold or pilot light deployment model with failover routing, if performance or availability was more important you can deploy to each region and use geo / latency based routing.

Tim
  • 31,888
  • 7
  • 52
  • 78
  • Ours is a tight SLA and a mandate to deploy in 100% of the regions due to the nature of the product. I specifically wanted to understand what advantage R53 failover provides that's not covered by Global Accelerator's multi region routing – marti H Jan 14 '22 at 00:09