Performance & Capacity
General material on performance and capacity engineering.
3 to work through
-
intermediate
Peak trading day is six weeks away and expected to be four times normal traffic. What do you do in those six weeks?
3 min answer -
intermediate
Precompute every user's timeline at write time, or assemble it at read time? Explain why the answer for a social feed is neither.
2 min answer -
intermediate
Your system handles 1,000 requests per second today. Marketing says a campaign will bring 10,000 next month. What breaks first, and how do you find out?
2 min answer
12 terms in this topic
Caching Strategy
The chosen pattern for how a cache is populated, read and invalidated — cache-aside, read-through, write-through or write-behind.
conceptConcurrency
The number of operations in progress at once — distinct from parallelism, which is how many are literally executing simultaneously.
conceptConnection Pool
A fixed set of reusable database connections shared by an application's requests, and one of the most common hidden capacity ceilings.
case-studyGoogle Maps and Planetary-Scale Spatial Serving
Map serving is fast because almost nothing is computed on request — the world is precomputed into a pyramid of tiles, and space is indexed onto a one…
patternHedged Request
Sending a duplicate of a request to a second replica after a short delay and using whichever response returns first, to cut tail latency.
conceptHorizontal vs Vertical Scaling
Adding more machines versus making one machine bigger — and the fact that vertical is underrated for stateful tiers.
conceptLittle's Law
In a stable system, the average number of items in it equals the arrival rate times the average time each spends in it — L = λW.
practiceLoad Testing
Driving a system with realistic traffic at a target volume to verify it meets its performance targets before real users do.
metricTail Latency
The latency experienced by the slowest small percentage of requests, which is what users and dependent services actually feel.
metricThroughput
The rate of work a system completes per unit of time — and a quantity that trades against latency rather than tracking it.
case-studyTwitter's Timeline Fan-Out
Twitter precomputes each user's timeline at write time but handles very-high-follower accounts at read time, because neither strategy alone survives …
case-studyWhatsApp's Small-Team Scale
WhatsApp served hundreds of millions of users with a few dozen engineers by matching one technology choice precisely to the workload and refusing to …
Neighbouring topics
Latency
Distributions rather than averages, and the floors physics imposes.
No content yetThroughput
Work completed per unit time, and why it trades against latency.
No content yetConcurrency
Operations in flight, and the limits that are the real capacity ceiling.
No content yetQueueing Theory
Why latency explodes as utilisation approaches capacity.
No content yetLittle's Law
L = λW, and the pool sizes it computes directly.
No content yetBottleneck Analysis
Finding the constraint, and expecting a second one behind it.
No content yetTail Latency
p99 behaviour, amplification across fan-out, and hedged requests.
No content yetLoad Testing
Realistic data, realistic mix, and a ramp rather than a step.
No content yetStress Testing
Pushing past target to learn what breaks first and how it fails.
No content yetSoak Testing
Long runs that surface leaks and slow degradation.
No content yetCapacity Modelling
Arithmetic before load tests, and headroom for failure as well as peak.
No content yetHorizontal vs Vertical Scaling
Scale out for stateless, scale up first for stateful.
No content yetCaching for Performance
Layer choice, hit ratio as a first-class metric, and cold-cache recovery.
No content yetDatabase Performance
Plans, indexes, contention and the pool in front of the database.
No content yetConnection Pooling
The most common hidden ceiling, and the metric nobody collects.
No content yetNetwork Performance Tuning
Keep-alive, compression, payload size and round-trip elimination.
No content yetPerformance Budgets
Targets enforced in CI so regressions fail the build.
No content yetProfiling & Optimisation
Measuring before optimising, and optimising the dominant term.
No content yetPeak Event Readiness
Freeze, pre-scale, shed order, warm caches and rehearse.
No content yet