Multi-region infrastructure for Cloudfront and EventBridge

0

We want to mirror our existing infrastructure in another region to for higher availability. The planned architecture is as follow:

Planned Infrastructure

I have a few questions:

  1. Some services are triggered by EventBridge rules such as "file uploaded into an S3 bucket" or "quarter-end". How should we mirror them so that only one region performs the task?
  2. Is there a way to make the fail over process transparent? If region 1 is unavailable, can all traffic automatically fail over to region 2 without any manual intervention?
2 Answers
1

I guess this depends on how you set up the backup region, if it is a replica or just a backup for when there is an issue, but you'll revert once the issue is resolved. If it is a replica, you'd want it to execute in both regions as if they were distinct. If it is just a backup, you can use replication to keep it insync with the main region.

  1. Set up s3 replication from the main bucket to the backup one, could be a way if you configure your second region as a failover (in case of emergency use it). Then just replicate the changes from the main region to the backup region.
  2. For making it failover automatically, you can use Route 53's failover feature. You can learn more about that here - https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-failover.html
profile picture
answered a year ago
  • We currently deploy to both regions but keep the second inactive, as backup. I want to activate it to share workload with the primary region. The S3 bucket and services are all in sync. What I'm primarily interested in is setting up traffic rules in Route 53 so that the traffic is rerouted as quickly as possible when a region fails. Latency-based traffic rules has a delay of ~60 seconds when we have to show a maintenance page. Is there a way to shorten that?

  • Also, the EventBridge-triggered services are a challenge to distribute in this infrastructure. If we have a rule that says "trigger this service at 9pm daily", how can we ensure that only 1 service from 1 region is invoked?

1

I would recommend looking at EventBridge Global Endpoints.

One more point: In your diagram you show two CloudFront distributions. If I am not mistaken, you should have only one distribution that points to two origins.

profile pictureAWS
EXPERT
Uri
answered a year ago
  • Thanks for pointing out the failover feature of Cloudfront. If I use one Cloudfront with 2 origins, can I distribute the traffic rather than just fail-over? Or do I have to use Route53's Traffic Rules in combination with Cloudfront multi-origin to achieve that?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions