{}DSA Atlas

Reliability Engineering & Observability

SLIs, SLOs, SLAs and error budgets, availability math for serial and parallel components, redundancy and failover, health checks, disaster recovery with RPO/RTO, backups, observability (metrics, logs, traces, RED/USE methods), alerting on symptoms and burn rates, chaos engineering, incident response and blameless postmortems.

Intermediate → Advanced6 interview questions

Measuring reliability

SLI — measure% requests OK < 300 msmeasured at the LB SLO — target99.9% over 30 daysbudget: 43 min / 0.1% SLA — contract99.5% or service creditslooser than SLO
Measure what users experience; spend the error budget deliberately.
AvailabilityDowntime / year/ 30 days/ week
99%3.65 days7.2 h1.68 h
99.9%8.77 h43.2 min10.1 min
99.95%4.38 h21.6 min5 min
99.99%52.6 min4.3 min1 min
99.999%5.26 min26 s6 s

Good SLIs by system type: request/response (availability, latency percentiles), pipelines (freshness, correctness, throughput), storage (durability, read/write availability).

Availability math

Series: A = A₁ × A₂ × A₃ LB 99.99 app 99.9 DB 99.95 = 99.84% (worse than any part) Parallel: A = 1 − (1 − a)ⁿ replica 99% replica 99% = 99.99% (if failures independent) reliability strategy: shorten the critical path, replicate what remains, decorrelate failures
Every synchronous dependency lowers availability; redundancy raises it.
Python
def series(*a):   # all must be up
    p = 1.0
    for x in a: p *= x
    return p

def parallel(a, n):   # any of n independent replicas
    return 1 - (1 - a) ** n

print(round(series(0.9999, 0.999, 0.9995) * 100, 3))   # 99.84
print(parallel(0.99, 2))                                 # 0.9999

Redundancy and failover

LayerTechnique
ComputeN+1/N+2 instances across ≥ 3 AZs, autoscaling, health-checked LB
Datareplicas across AZs, automatic failover (Patroni, RDS Multi-AZ, Raft-based DBs)
Networkmultiple LBs, anycast, redundant DNS providers
RegionDR region or active-active
Dependenciesfallbacks, caches of last good response, multiple vendors (payment, SMS)

Health checks: shallow (process alive) vs deep (dependencies OK). Deep checks can cause mass eviction when a shared dependency fails — LBs should "fail open" when all targets look unhealthy.

Static stability: design so the system keeps working in its current state when the control plane (autoscaler, config service) fails — e.g., pre-provision capacity in each AZ to absorb an AZ loss rather than relying on scaling up during the incident.

Disaster recovery

last good backup disaster service restored RPO = data lost RTO = downtime
RPO looks backwards (how much data), RTO looks forwards (how long).

Backups: 3-2-1 rule (3 copies, 2 media, 1 offsite), point-in-time recovery (base backup + WAL archive), immutable/air-gapped copies against ransomware, and scheduled restore drills. Replication is not a backup — it faithfully replicates DROP TABLE.

Observability

trace 4bf92f… GET /checkout (420 ms) api-gateway 420 ms auth 60 ms orders 340 ms DB 30 payments 290 ms ← bottleneck card-network call 260 ms spans share a trace ID propagated in the traceparent header; each span has parent, timing, attributes
Traces answer "where did the time go?" across services.
MethodForSignals
REDrequest-driven servicesRate, Errors, Duration
USEresources (CPU, disk, pools)Utilisation, Saturation, Errors
Four golden signals (Google SRE)any user-facing systemlatency, traffic, errors, saturation

Track percentiles (p50, p95, p99, p99.9), never just averages — averages hide the tail, and at fan-out the tail dominates (a page calling 100 services sees the p99 of each on most loads).

Alerting on burn rate

SeverityCondition (99.9% SLO)Action
Page2% of monthly budget burned in 1 h (14.4× rate)wake someone
Page5% burned in 6 h (6× rate)wake someone
Ticket10% burned in 3 days (1× rate)next business day

Incident response

  1. Detect (alerts, user reports) → 2. Triage and declare severity → 3. assign an incident commander, communications lead, and responders → 4. Mitigate first (roll back, fail over, shed load, toggle feature flag) — root cause later → 5. communicate status (status page) → 6. resolve → 7. blameless postmortem: timeline, impact, contributing factors, what went well, action items with owners.

Chaos engineering

Hypothesis → inject fault → observe SLIs → fix → automate. Examples: terminate random instances, inject 500 ms latency into a dependency, black-hole an AZ, fill a disk, expire certificates early, return errors from DNS.

Interview questions

0 / 6 marked confident

Answer out loud first, then open the model answer. Mark a question confident only when you could explain it to an interviewer without notes.