Fault Tolerance
Circuit breakers, retries, bulkheads, graceful degradation.
Theory
Fault tolerance means the system continues to deliver core functionality when components fail — through redundancy, isolation, and graceful degradation rather than total outage.
Circuit breakers stop calling a failing dependency after a threshold, failing fast instead of queuing timeouts. Bulkheads isolate thread pools per dependency so one slow service cannot exhaust all resources. Retries use exponential backoff with jitter.
Graceful degradation disables non-essential features under stress (recommendations, analytics) while keeping checkout and auth alive. Every outbound call needs a timeout — cascading waits are the most common cause of full-system outages.
Production rollouts require idempotent automation, peer review, staged apply, and documented rollback — treat changes as production code.
Interviewers want STAR stories linking Fault Tolerance to measurable outcomes: fewer outages, faster deploys, lower cost, or reduced toil.
Architecture Diagram
Users / clients
|
Fault Tolerance
|
Core services
|
Data + observabilityExamples
# Fault Tolerance
# Circuit breakers, retries, bulkheads, graceful degradation.
# Validate in staging before production rollout.
Interview Questions
What problem does Fault Tolerance solve?
It addresses the core use case described in production architecture — map features to reliability, scale, or velocity outcomes.
Key components of Fault Tolerance?
Identify inputs, outputs, control plane, data plane, and failure domains — interviewers want structured decomposition.
Common production pitfalls?
Misconfiguration, missing observability, no rollback path, and scaling bottlenecks under peak load.
How do you test changes safely?
Staging parity, canary/gradual rollout, automated health checks, and documented rollback.
Metrics to prove success?
Error rate, latency percentiles, throughput, cost, and toil reduction — pick one primary SLO.
Beginner vs advanced concern?
Beginners focus on setup; advanced teams focus on blast radius, security boundaries, and operability at 10× scale.
Best Practices
- Treat Fault Tolerance config as code with review and CI validation.
- Define SLOs and dashboards before production cutover.
- Document rollback and ownership for on-call.
- Use least privilege for credentials.
Common Mistakes
- Adopting Fault Tolerance without measurable success criteria.
- No staging environment mirroring production constraints.
- Missing rollback path during incidents.
- Undocumented on-call expectations.
Trade-off Analysis
Fault Tolerance improves circuit breakers, retries, bulkheads, graceful degradation. but adds operational and cognitive complexity — justify with load and team size.
Favor simplicity until metrics (p99 latency, error rate, cost) prove the pattern necessary.
Every redundancy layer trades capital/operational cost for availability — align with explicit SLO targets.
Document accepted inconsistency windows and recovery behavior before production cutover.
Cheat Sheet
Practical Exercises
Stand up Fault Tolerance locally or in free tier; document commands and failure recovery.
Introduce misconfiguration; practice detection and rollback under time limit.