How do you make a service resilient to a single data center failure on AWS?
Options
- Use a bigger instance type so that it does not fail
- Run across several Availability Zones behind a load balancer (Correct option)
- Take daily snapshots and restore them after a failure
- Use a single AZ with an auto-restart policy on the instance
Answer
Run instances across multiple Availability Zones behind a load balancer, with a multi-AZ database
Why
An AWS region (e.g. eu-west-1) contains several Availability Zones: separate data centers with independent power and networking.
If all your servers are in one AZ, a problem there takes you down. Spread instances across 2-3 AZs behind a load balancer and use a database with a standby in another AZ.
Multi-region protects against a whole region failing, at a higher cost.
Remember
Spread across Availability Zones.