Multi-AZ redundancy
Resilience & Reliability
Start lesson · ~15 minMembers
An availability zone is a group of datacenters inside one region with its own power, cooling and network, a millisecond or two from its neighbors. Spreading every tier across two or three zones lets the app survive a zone failing — if the zones left already have the capacity to carry the load. Launching replacement servers after the loss is too slow and depends on the very systems that may be impaired, so statically stable designs over-provision ahead of time, for example three zones each sized so that any two carry everything. Stateful parts need their own zone redundancy, such as a database standby in a second zone. Zones share their region's fate, so they don't protect against a whole region going down.
- Use when
- Any production workload — run in at least two zones, three where the region has them · Services that must ride out a datacenter's power, cooling or network failure without anyone acting · Databases and other single-primary stores — a standby in a second zone
- Avoid when
- Dev and test environments where an outage costs little · As the only protection when the business needs to survive a whole region failing (core/multi-region)
- Trade-offs
- Survives a zone without reacting, for capacity that sits idle every normal day (+50% with three zones, +100% with two) · Cross-zone calls add a millisecond or two and may be billed; keeping traffic inside a zone is faster and contains a bad zone, at the cost of more moving parts · A synchronous standby in another zone keeps data safe through a zone loss, but every write waits for it
3 objectives · 9 misconceptions
- Explain why every tier — load balancer, servers, database — must span independent zones, and what a zone failure does to a tier left in one zone.
- Predict whether the zones left after a failure can carry the load, from how many zones there are and how busy each one runs before the loss.
- Choose how many zones to run, how much spare capacity to keep in each, and whether to keep traffic inside a zone or spread it across zones.
- Not true: Any app running in two zones survives losing one of them.
- Not true: When a zone fails, autoscaling launches replacement servers in the other zones in time.
- Not true: Two zones need the same spare capacity as three to survive a zone loss.
- Not true: Spreading the web servers across zones is enough, even if the database runs in one zone.
- Not true: Availability zones are separate racks in the same datacenter.
- Not true: Calls between zones in one region are as slow as calls between regions.
- Not true: A database standby in another zone costs nothing in write speed.
- Not true: An app spread across a region's zones survives the whole region going down.
- Not true: Capacity kept idle for a zone loss that may never come is wasted money.
Practice
Unlocks
Nothing yet.