概念
Failover and distributed design patterns
Remove single points of failure, fail over on health checks, and survive overload with backoff and circuit breakers.
本课尚未翻译,暂以英文显示。
Retry with backoff and jitter
- What it does
- Waits longer each time, with a random delay
- Example
- SDK retries, queue redelivery
Timeout
- What it does
- Stops waiting for a slow call
- Example
- Connection and read timeouts
Circuit breaker
- What it does
- Stops calling a failing service, fails fast
- Example
- Pause calls for 30 seconds
Bulkhead
- What it does
- Isolates resources per part
- Example
- Separate queues or groups
Graceful degradation
- What it does
- Returns a reduced result
- Example
- Show cached prices
| Pattern | What it does | Example |
|---|---|---|
| Retry with backoff and jitter | Waits longer each time, with a random delay | SDK retries, queue redelivery |
| Timeout | Stops waiting for a slow call | Connection and read timeouts |
| Circuit breaker | Stops calling a failing service, fails fast | Pause calls for 30 seconds |
| Bulkhead | Isolates resources per part | Separate queues or groups |
| Graceful degradation | Returns a reduced result | Show cached prices |
1 / 2
Retry with backoff and jitter
- What it does
- Waits longer each time, with a random delay
- Example
- SDK retries, queue redelivery
Timeout
- What it does
- Stops waiting for a slow call
- Example
- Connection and read timeouts
| Pattern | What it does | Example |
|---|---|---|
| Retry with backoff and jitter | Waits longer each time, with a random delay | SDK retries, queue redelivery |
| Timeout | Stops waiting for a slow call | Connection and read timeouts |
2 / 2
Circuit breaker
- What it does
- Stops calling a failing service, fails fast
- Example
- Pause calls for 30 seconds
Bulkhead
- What it does
- Isolates resources per part
- Example
- Separate queues or groups
Graceful degradation
- What it does
- Returns a reduced result
- Example
- Show cached prices
| Pattern | What it does | Example |
|---|---|---|
| Circuit breaker | Stops calling a failing service, fails fast | Pause calls for 30 seconds |
| Bulkhead | Isolates resources per part | Separate queues or groups |
| Graceful degradation | Returns a reduced result | Show cached prices |
是什么
A single point of failure (SPOF) is a part whose failure stops the system. Look for them tier by tier: one server, one AZ, one NAT gateway, one database, one DNS record, one person. Fix each with a copy. Active-active runs all copies and shares the load, so a failure only shrinks capacity. Active-passive keeps a copy idle until health checks say the first has failed. Active-active recovers faster. Active-passive costs less and suits data that needs one writer.
是什么
Failures also come from overload and slow dependencies. Retry with exponential backoff and jitter: wait longer after each failure, with a random delay so clients do not all retry together. Set timeouts so a slow call does not hold a thread forever. A circuit breaker stops calling a failing service for a while and fails fast. Bulkheads split resources so one overloaded part cannot use them all: separate queues, thread pools or Auto Scaling groups. Graceful degradation serves a reduced answer, such as cached data, instead of an error.
是什么
Loose coupling and statelessness help too: a queue lets a producer survive a slow consumer, and a stateless server lets any copy take over. Put health checks at every level: load balancer, Route 53 and Auto Scaling. A static fallback page in Amazon S3, behind a Route 53 failover record, keeps users informed when the application is down.
要记住
- Find every single point of failure: server, AZ, NAT gateway, database, DNS, person.
- Active-active shares load. Active-passive keeps a standby that health checks activate.
- Retry with exponential backoff and jitter. Never retry in a tight loop.
- Timeouts and circuit breakers keep one slow dependency from sinking its caller.
要记住
- Bulkheads isolate parts. Graceful degradation returns a reduced result.
- A static fallback page in S3 can answer when the application is down.
考试中
- “Clients overload a recovering service with retries” points to exponential backoff with jitter.
- “Keep serving the product catalog from cache when the pricing service is down” describes graceful degradation.
- “Eliminate the single point of failure” points to a second AZ or a second copy of the component named in the question.
别和这些弄混
- Regions and AZs as the HA building blockWhich services are Region-wide and which belong to one AZ, and how to spread tiers so that one AZ can fail.
- Service QuotasRaise quotas in the standby Region too, handle throttling with backoff, and watch usage before it bites.
Amazon Simple Queue Service (Amazon SQS)The settings that decide behavior: visibility timeout, long polling, delay, retention, DLQs, and scaling on queue depth.
本任务内容 · 2.2
- Regions and AZs as the HA building block
- Multi-Region designs
Route 53
- Disaster recovery strategies
Elastic Disaster Recovery
- Failover and distributed design patterns
- AWS Well-Architected Framework
- Immutable infrastructure and deployments
CloudFormation
- Database high availability
- Storage durability and replication
CloudWatch
Health Dashboard
X-Ray
- Service Quotas
- Making legacy apps reliable without code changes
- Migrating workloads to AWS
- Choosing purpose-built services
- Managed AI services recap
Backup
Load Balancing
RDS Proxy
- Throttling strategies