HLD Cheat Sheet

By the Syncfusion DevTutorials team · Last updated

Every number, formula, building block and pattern from High-Level Design on one page: latency, estimation, capacity, the four checks and common trade-offs.

This page collects the numbers, formulas and patterns from the whole High-Level Design tutorial in one place. Use it before a design review or an interview, or whenever you need a number fast. Each row points back to the lesson that explains it.

The Design Loop

Every design in this tutorial followed the same five steps (Lesson 1, and every case study).

StepAskOutput
1. RequirementsWhat must it do? How well? What is out of scope?Functional list, non-functional targets (p99, availability, budget)
2. EstimateHow many requests, how much data, how much bandwidth?Reads/s and writes/s at peak, storage per year, Gbit/s
3. DesignWhich parts, connected how?A diagram with a read path and a write path
4. CheckDoes it meet the targets at peak, after one failure, within budget?Pass or fail, with the busiest part named
5. Trade-offsWhat did you give up? What breaks first at 10 times the size?A short list of decisions and their costs

Numbers to Know

Latency (Lesson 3)

ActionTimeIf memory read = 1 second
Read from memory100 ns1 s
Read from SSD150 µsabout 25 minutes
Round trip inside a data centre0.5 msabout 1.4 hours
Hard disk seek10 msabout 28 hours
Round trip to another continent150 msabout 17 days

Time and Traffic (Lesson 2)

FactValue
Seconds in a day86,400 (round to 100,000 for quick sums)
1 million requests a dayabout 12 a second on average
Peak factorbusiest second is often 2 to 10 times the average
Bits and bytes1 byte = 8 bits; network speeds are in bits

Availability (Lesson 1)

TargetDown per yearDown per month
99%about 3.7 daysabout 7.3 hours
99.9%about 8.8 hoursabout 44 minutes
99.99%about 53 minutesabout 4.4 minutes

Formulas

A worked example: 1 million events a day, a peak factor of 5, 500 bytes each kept for 5 years in 3 copies, and 50 KB per response.

EstimateWorkingResult
Average rate1,000,000 ÷ 86,40011.6 a second
Peak rate11.6 × 558 a second
Storage1,000,000 × 365 × 5 × 500 bytes × 32.74 TB
Bandwidth at peak58 × 50 KB × 80.02 Gbit/s
WhatFormulaLesson
Average rateper day ÷ 86,4002
Peak rateaverage × peak factor2
Storageitems × size × days kept × copies2
Bandwidthpeak requests × response size × 82
Servers neededpeak ÷ per-server capacity, + 1 spare (+ more to stay under ~70% busy)4
Busy (utilisation)arrival rate ÷ capacity; above about 80–90%, waits grow fast4, 11
Average read time with a cachehit × cache time + (1 − hit) × database time5
Reads that reach the databaserequests × (1 − hit ratio)5
Quorum overlapW + R > N means every read sees the latest write8
Error budget(100% − SLO) × requests1, 12
Burn ratecurrent error rate ÷ error budget rate12
Code length (base62)smallest k with 62^k ≥ total itemsCase: URL shortener
Connections per gatewayonline users ÷ connections per gateway, + 1 spareCase: Chat

The chart shows how fast waiting grows as one server gets busy, when each request needs 10 ms of work:

Going from 50% to 90% busy makes the average wait five times longer: 20 ms to 100 ms. At 95% it doubles again to 200 ms.

This is why the case studies keep every tier comfortably below 90% busy, even after one machine is lost.

Building Blocks

PartUse it forWatch out forLesson
Load balancerSpreading requests over serversIt is a single point of failure: run two4
CacheHot, read-heavy dataStampedes, stale data, losing a node5
Database leader + followersDurable data; followers for readsWrites all go to one leader6
Partitioning (sharding)Data or writes too big for one machineHot keys, re-sharding7
QuorumsTuning consistency against speedW + R > N for strong reads8
QueueSlow or bursty work, decouplingAt-least-once delivery: make work idempotent9
Rate limiterProtecting services from floodsShared counters, fail open10
Timeouts, retries, breakersSurviving slow or failing dependenciesRetry storms: back off with jitter11
Metrics, logs, tracesSeeing what is wrong, and whereAlert on symptoms, not causes12
Object storageFiles of any sizeKeep details in a database rowCase: File storage
CDNFiles and segments for many usersGive changed files new namesCase: File storage, Video
Pub/subRouting messages to the right serverOffline receivers need saved messagesCase: Chat

Pattern to Problem

Problem you seePattern to reach forCase study
Same data read again and againCache-first read pathURL shortener
Many small writes on every readMove the write to a queueURL shortener (click counts)
Bots or scripts flooding an endpointShared rate limiter, fail openRate limiter service
Expensive reads that combine many sourcesPrecompute on write (fan-out), hybrid for giantsNews feed
Server must push to a clientWebSockets + pub/sub routingChat
Too many writes for one leaderPartition by a key that keeps related data togetherChat
Slow outside providersQueue per channel, retries with dedupe keysNotification system
Large filesObject storage, presigned uploads, CDNFile storage
Very high request rate, tiny answersPrecomputed index in memory, debounce, cacheSearch autocomplete
Money or anything that must happen onceIdempotency keys, state machine, ledger, reconciliationPayments
Heavy background jobs that must finish soonSplit into chunks, run in parallelVideo streaming
Expensive, slow compute per requestStream results, batch work, cache answersLLM inference serving

The Four Checks

Every case study design was graded the same way. Use the same list in a real design review.

CheckQuestionTypical fix when it fails
Peak loadDoes p99 meet the target at the busiest second?Cache, more machines on the busiest tier, move work to a queue
Lose any one machineDoes anything fall over when one box dies?A spare of every kind; replicas; two cache nodes
CostIs it within budget?Remove spares that are not needed; use the cheapest part that does the job
RequirementsAre the non-speed rules met (no double charges, unique codes, counted clicks)?Idempotency keys, queues, the right redirect, ID ranges

In an interview, say the four checks out loud as you go: "At peak this tier is about 70% busy. If one server dies it goes to about 90%, so I add a spare. That costs one more server a month." That one sentence shows estimation, failure thinking and cost.

Common Trade-offs

ChoiceYou gainYou give up
CacheSpeed, less database loadPossible stale data, one more thing to fail
Replicas for readsRead capacity, survivalReplication lag: followers can be behind
Strong consistencyAlways-correct readsLatency, and availability during partitions
QueueFast answers, smooth burstsThe work finishes later; must handle duplicates
Push (fan-out on write)Cheap readsExpensive writes, especially for huge accounts
301 redirectLess trafficClicks you cannot count
Fail openAvailabilityBrief loss of protection
BatchingThroughputA little more delay per item

Common mistakes

MistakeWrongCorrectWhy it happens
Designing before estimatingBoxes first, numbers never.Requirements, then estimates, then design.Drawing is more fun than arithmetic.
Averages only"Average 40 ms, we are fine."Use p99 and the peak second.Averages hide the slowest users and the busiest minute.
No spareExactly enough machines for peak.Peak plus one of each kind, below about 90% busy after a loss.It meets the target on paper.
One of anythingA single load balancer, cache node or leader.Two, or a clear plan for losing it.Single parts work perfectly until they do not.
Retrying without a keyRetries that repeat side effects.Idempotency keys on every retried action.Retries are added later as a quick fix.

All numbers here are the ones used in this tutorial's lessons and simulators. Real systems differ; the point is the order of magnitude and the habit of checking, not the exact value.

Further Reading