Concept

High availability

Designing a system so that it keeps working when individual components, servers or whole data centres fail.

AvailabilityFault toleranceDisaster recoveryLoad balancing

What it means

High availability means a system stays usable when parts of it fail. It is achieved by removing single points of failure: run more than one copy of every component, spread the copies across independent failure domains, detect failures quickly, and route traffic away from what has failed.

Availability is usually stated as a percentage of time the system works. Each extra "nine" allows far less downtime, and each is progressively more expensive, so the target should come from what the business needs.

Why it matters

Hardware fails, software has bugs, deployments go wrong and whole data centres lose power or connectivity. A design that assumes none of this will happen turns each of these into an outage.

In practice

  • Redundancy: at least two instances of every tier, so one can fail.
  • Independent failure domains: put copies in different Availability Zones (and, for larger risks, Regions).
  • Health checks and automatic recovery: load balancers stop sending traffic to unhealthy targets, and auto scaling replaces them.
  • Stateless tiers and replicated data: keep session state and data in a replicated store so any copy can serve any request.
  • Graceful degradation: when a dependency fails, serve a reduced answer instead of an error.

Examples

A web application runs on instances in two zones behind a load balancer, with a database that keeps a standby copy in the second zone. If a zone fails, traffic shifts to the other zone and the database fails over.

Exam cues

  • High availability means surviving component or zone failure with little interruption; disaster recovery is recovering after a larger event, measured by recovery time and recovery point objectives.
  • Multiple Availability Zones are the standard answer to "highly available"; multiple Regions are for disaster recovery and global users.
  • Fault tolerant goes further than highly available: the system continues with no interruption at all when a component fails.

Related

Courses and lessons

Services, comparisons and patterns

Sources

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake