Score:0

AWS: Multi region APIGateway with single endpoint

us flag

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 avatar
gp flag
Tim
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.
us flag
@tim Updated the language
Tim avatar
gp flag
Tim
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.
us flag
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.
Tim avatar
gp flag
Tim
What is your workload behind the API gateway? Lambda, EC2 instances, etc? Is it low or high volume?
Score:0
gp flag
Tim

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.

us flag
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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.