Skip to main content
All tracks
System Design Fundamentals

Reliability and Observability

Designing for failure​

Everything fails: disks, networks, whole zones. Aim to avoid single points of failure and to degrade gracefully.

TechniquePurpose
Redundancy / replicationSurvive node or zone loss
Health checks and failoverRemove bad instances automatically
TimeoutsNever wait forever
Retries with backoff and jitterRecover from transient errors without a retry storm
Circuit breakerStop calling a failing dependency and fail fast
BulkheadsIsolate resources so one failure does not drain everything
Graceful degradationServe reduced functionality instead of an error
import random, time

def call_with_retry(fn, attempts=5, base=0.1):
for i in range(attempts):
try:
return fn()
except Exception:
if i == attempts - 1:
raise
time.sleep(base * 2 ** i + random.uniform(0, base))
CAUTION

Retries multiply load. Combine them with timeouts, a retry budget and circuit breakers, or a small outage can become a large one.

SLI, SLO and SLA​

TermMeaningExample
SLIA measured indicator99.95% of requests succeed
SLOThe internal target99.9% monthly availability
SLAA contractual promise with penalties99.5% or credits

The error budget is 100% - SLO; it balances shipping speed against stability.

Observability​

PillarAnswersTools
MetricsHow is it behaving? (rates, errors, latency)Prometheus, Grafana
LogsWhat happened?ELK, Loki
TracesWhere did time go across services?OpenTelemetry, Jaeger

Track the golden signals: latency, traffic, errors and saturation. Alert on symptoms users feel, not on every internal cause.

Deployment safety​

Blue-green and canary releases, feature flags, automated rollback, and database migrations that are backwards compatible.

Finished reading?

Mark it complete to track your progress across the docs.

Questions and discussion

Stuck on something here, or found a clearer way to explain it? Start a thread.

All discussions
  • Ask a question or share what helped
  • React to useful answers
  • Sign in with GitHub to post

Comments are stored in GitHub Discussions and shown here by giscus. PrepVerse never sees your GitHub password.