I'm trying to set up a resilient architecture using AWS services with Route 53, CloudFront, and S3, and I need some advice. Right now, my setup routes through Route 53 to CloudFront, which then connects to either S3 or an API Gateway. The current origins are based in the EU (specifically eu-west-1), and we want to add another region (eu-central-1) for disaster recovery purposes.
I'm thinking of using Route 53's weighted routing policies and health checks to manage traffic between two dedicated CloudFront distributions: one for eu-west-1 and another for eu-central-1. The idea is that when someone accesses my app at 'myapp.com', Route 53 would decide which CloudFront instance to route to based on these policies while still allowing direct access to each region via separate subdomains like eu-west-1.myapp.com and eu-central-1.myapp.com.
I've set up four Route 53 records:
1. myapp.com with a weighted routing of 50 to eu-west-1.myapp.com
2. myapp.com with a weighted routing of 50 to eu-central-1.myapp.com
3. eu-west-1.myapp.com that directly points to its CloudFront distribution
4. eu-central-1.myapp.com that points to its CloudFront distribution as well.
I'm facing issues with SSL connection failures and I'm unsure if my configuration will work as intended. I've considered using a single CloudFront instance with origin groups for failover, but I prefer having two instances to support active-active deployments and the ability to manage traffic during maintenance. How are others managing similar setups?
1 Answer
I wouldn't go for two separate CloudFront distributions. Remember that CloudFront is designed to work globally, so using multiple distributions can complicate your setup without adding much benefit. Instead, consider using origin failover and Route 53's routing features to handle traffic more effectively. This way, you can manage origins instead of setting up multiple CDNs.
You make a great point! The focus should definitely be on routing to the right origins. Using a single CloudFront setup can save a lot of hassle and ensure that most of the load is managed smoothly.