Reliability, Scalability, and Maintainability
The three qualities every data system is judged on: correct answers when parts fail, steady performance as load grows, and a system people can run and change for years.
Overview
Every data system is judged on three qualities. Reliability: it keeps giving correct answers when hardware breaks, software has bugs and people make mistakes. Scalability: when load grows, there is a clear way to add resources and keep performance steady. Maintainability: many engineers can run it, understand it and change it for years.
These words are easy to say and hard to make precise. A strong interview answer turns each one into something you can measure and a technique that improves it, and says what that technique costs.
Reliability: faults are normal, failures are not
A fault is one part not doing its job: a dead disk, a crashed process, a bad config value. A failure is the whole system no longer giving users the service it promised. Faults cannot be prevented, so reliable systems are built to tolerate them: they detect a fault and contain it before it becomes a failure.
Follow one fault, a disk that dies, down both paths. If the system detects and contains it, a replica takes over and users notice nothing. If it does not, errors spread to its callers until the service is down and users see a failure. The fault is the same in both cases; redundancy and detection decide where it ends.
Faults come in three kinds, and they need different defenses.
- Hardware faults: a disk, memory or power supply dies. They are mostly random and independent of each other. The main defense is redundancy: replicas, RAID and spare machines.
- Software faults: a bug crashes every node on the same bad input. They are correlated, so they hit many machines at once. The main defenses are testing, isolation, gradual rollouts and watchdogs.
- Human faults: someone pushes a wrong config value to production. They are common and often slow to fix. The main defenses are safe tools, staged rollouts, quick rollback and good monitoring.
Hardware faults are rare per machine but constant at scale. Disk makers quote a mean time to failure of 1,000,000 to 1,500,000 hours, which implies under 1% of disks fail each year. A field study of over 100,000 drives found yearly replacement rates above 1% as a rule, commonly 2 to 4%, and up to 13% on some systems. At 3% a year, a cluster of 10,000 disks replaces about 300 disks a year, or almost one a day. So a large system is always running with something broken.
Human error deserves the most attention. A study of three large Internet services found operator error was the single largest cause of failures in two of them, and configuration mistakes were the most common kind of operator error.
Key concepts
- Reliability
- Fault
- Failure
- Load parameters
- Throughput
- Response time percentile
- Scale up and scale out
- Operability, simplicity, evolvability
- Accidental complexity
Interview questions
- What is the difference between a fault and a failure, and why does it matter?
- How do you define and measure scalability for a design?
- Why is human error treated as a first-class reliability problem?
- How would you make a service survive losing one machine without users noticing?
- What makes a system maintainable in practice?
Sign up free to read the full topic
More DDIA topics
- Multi-Leader Replication
- OLTP vs OLAP
- Ordering and Causality
- Partitioning Strategies: Range vs Hash
- Rebalancing Partitions
- Relational vs Document Data Models
- Replication Lag and Consistency Anomalies
- Schema Evolution and Backward/Forward Compatibility
- Schema-on-Read vs Schema-on-Write
- Secondary Indexes and Index Trade-offs
- Secondary Indexes on Partitioned Data
- Single-Leader Replication
Start free on Cariara · Coding problems · System design studio