Templates
System design templates
Tierslate has 100 system design templates in 11 categories - 96 architecture diagrams and 4 database schemas, from URL shorteners and rate limiters to payment ledgers, chat and LLM serving. Every template's problem statement and requirements are free to read on this site; 6 templates are free in full, and the worked answer to the other 94 opens in the Tierslate editor.
100 architecture boards you can read as an article and open as a board. Each one is a diagram with a narrated walkthrough through it; most also carry written requirements, capacity and storage estimates, an availability plan and a real database schema. They are the questions that get asked in system design interviews, drawn rather than described.
Start free
6 boards are free in full - the diagram, the narrated walkthrough and the written pages - and open in Tierslate with nothing to buy.
- Free
Rate limiter - token bucket, and where the counter lives
Why the hard part of limiting requests is where the shared counter lives, not the algorithm.
- Free
Ride matching - the nearest car is the wrong car
Teaches how a geospatial index turns supply and demand into a dispatch decision, and why that decision is an assignment over a batch rather than a nearest-neighbour lookup.
- Free
Pastebin - a blob store with a short name
Why storing text is the easy part and expiry, abuse and the read path are the design.
- Free
Load balancer - spreading traffic, and noticing who is dead
How requests are spread across servers, and why the health check matters more than the algorithm.
- Free
API gateway - one front door for many services
Why auth, routing and limits move to one front door, and what that door costs when it falls over.
- Free
Leaderboard - a sorted set and the rank nobody stores
How a sorted set answers top ten and my rank in milliseconds, and why rank is computed rather than stored.
Messaging & realtime templates
Delivery, presence, ordering, and who is typing.
Chat and messaging - one socket, many deliveries
Delivery guarantees, presence and ordering across devices.
Transactional email - the receiver decides
Why getting an email into the inbox is a negotiation with a receiver whose rules you cannot see.
Presence - the most expensive cheap feature
Why a green dot is a claim that expires, and why fanning it out costs more than every message sent.
Push notifications - the token outlives the install
Why push failures are silent, and how token lifecycle keeps a dead token from counting as delivered.
Team channels - the unread count is the hard part
Why a 30,000-member channel is not a big DM, and why the unread badge is the hardest number to keep.
Encrypted delivery - one tick, two ticks, blue
What changes when the server cannot read the message, and why every tick after the first is a device claim.
Webhook delivery - retrying into somebody else's outage
Why a webhook is a promise to keep calling until the receiver answers, and how retries avoid becoming an attack.
Notification router - one event, the right channel, once
How one event is turned into email, push or SMS by preferences and quiet hours, without sending it twice.
Video & media templates
Upload, transcode, deliver - and pay for the bandwidth.
Image CDN - resize on the fly, or store every size
Why the cache key is the design, and why egress and the long tail of misses set the bill, not CPU.
Live streaming - latency against the buffer that saves you
Why segment length sets latency, resilience and cost at once, and what each second removed costs.
Streaming playback - the bytes were already next to you
Why streaming is a bandwidth problem, solved by placing the bytes inside the network before anyone asks.
Transcoding pipeline - 480 tasks, one file
Why one number, the size of a segment, sets the cost, latency and failure behaviour of the whole pipeline.
Video upload - one file in, seven encodes out
Why a durable receipt for a 500 MB upload and a video that plays everywhere are two separate promises.
File upload - the bytes never touch your server
How presigned URLs send uploads straight to object storage, and what the server still has to check afterwards.
Music streaming - three minutes of audio, played a billion times
Why audio is small enough to prefetch, and why play counts and royalties are the hard ledger underneath.
Short video feed - the next swipe is already downloading
Why a short-video feed is ranking plus prefetch, and why the first second of video decides retention and cost.
Video calls - forwarding streams, not mixing them
Why a group call forwards streams through an SFU, and how bandwidth estimation keeps a bad link from ruining the call.
Marketplaces & booking templates
Two-sided systems where inventory must not be sold twice.
Checkout - holding stock you have not sold yet
Why stock is held before the card is charged, and what must unwind when the charge fails.
Auction bidding - the clock is part of the system
Why bids are ordered by a sequence under one lock rather than a clock, and how soft close moves the end.
Food delivery - three parties and a promise
How three parties who can each say no move one order through a shared state machine to a promised ETA.
Hotel booking - selling a range, on purpose, slightly twice
Why a stay is sold night by night or not at all, and why selling the last room twice is sometimes deliberate.
Seat sales - fifty thousand people, one hundred seats
Why fifty thousand buyers for one hundred seats is a contention problem that sharding cannot solve.
Coupon codes - redeemable once, by anyone, at the same moment
Why a single-use code is a race between every checkout holding it, and how a conditional write settles it.
Rental search - availability is a calendar, not a column
How a stay search filters by place, dates and price at once, and why the availability calendar is the bottleneck.
Job board - search, apply, and the recruiter's inbox
How listings are indexed for search and applications are routed, and why expired jobs must disappear fast.
Infrastructure primitives templates
The building blocks an interview asks you to build from scratch.
URL shortener - one write, a million reads
Why one tiny write and a hundred cacheable reads make two systems sharing a single table.
Distributed cache - the ring, and what a node leaving costs
Why a hash ring moves a sliver of keys when a node leaves, and why the hot key and the miss storm remain.
Key-value store - quorums, and where the consistency knob sits
How a key finds its replicas, and why choosing how many to wait for buys overlap rather than order.
- Free
Rate limiter - token bucket, and where the counter lives
Why the hard part of limiting requests is where the shared counter lives, not the algorithm.
Unique ID generator - 64 bits, and two facts nobody can check
How 64 bits buy sortable ids with no central counter, and what happens when the clock goes backwards.
Web crawler - a frontier, and the trap of crawling forever
Why a crawler that feeds on its own output needs politeness, deduplication and loop brakes more than speed.
- Free
Pastebin - a blob store with a short name
Why storing text is the easy part and expiry, abuse and the read path are the design.
- Free
Load balancer - spreading traffic, and noticing who is dead
How requests are spread across servers, and why the health check matters more than the algorithm.
- Free
API gateway - one front door for many services
Why auth, routing and limits move to one front door, and what that door costs when it falls over.
Login and sessions - who you are, on every request
How a password becomes a session, and what changes when the session is a signed token nobody can revoke.
Feature flags - a config change that ships like code
Why a flag is evaluated locally from a pushed ruleset, and what a stale ruleset does during an incident.
Secrets manager - the one store everything trusts
How secrets are encrypted under a key nobody holds directly, and why rotation is the feature, not storage.
DNS - the cache that runs the internet
How a name becomes an address through layers of caches, and why the TTL decides how fast a mistake spreads.
Distributed cron - exactly one runner at nine o'clock
Why a scheduled job needs a lease so it runs once, not once per server, and what a missed tick should do.
Background job queue - at least once, and the retry that doubles it
Why a job queue delivers at least once, and how idempotent workers and dead letters keep retries honest.
Code execution sandbox - running a stranger's program
How untrusted code is run in isolated, time-limited sandboxes, and why the queue in front of them is the real system.
Distributed log - Kafka from the partition up
Why an append-only partitioned log gives ordering and replay, and what replication and consumer offsets cost.
Consensus - a leader, a log, and a majority
How Raft keeps replicas agreeing through elections and a replicated log, and what a network partition really does.
Object storage - eleven nines from cheap disks
How objects are split, erasure-coded and placed across failure domains so losing disks never loses data.
Payments & ledgers templates
Systems where losing a write is losing money.
Double-entry ledger - the balance is not a column
Teaches why money is stored as immutable movements and read as a derived sum, and what it costs to never update a total.
Fraud detection - a decision that must fit in 120 milliseconds
Teaches how a risk decision is split between a synchronous call with a hard deadline and an asynchronous review that is allowed to be right.
Payment gateway - what a timeout means when the card may already be charged
Teaches how a payment system stays correct when its authoritative dependency can fail in a way that tells you nothing.
Matching engine - price-time priority, and why the clock cannot decide who was first
Teaches why an exchange assigns order with a sequence number instead of measuring it with a clock, and what a single-threaded book buys in return.
Wallet transfers - the state machine, the hold that expires, and the reversal that cannot
Teaches how money moves between two accounts in one system without ever being in both places or neither, and what it costs to make every step undoable.
OTP verification - six digits and a clock
How a one-time code is issued, rate limited and checked, and why the SMS bill is the attack surface.
Subscription billing - the invoice is computed, not typed
How a recurring charge is driven by a billing clock, proration and dunning, and why plan changes are the hard part.
Currency exchange - a rate that is only true for a few seconds
Why a quoted FX rate is a short-lived promise with an expiry, and how rounding is a ledger decision.
Loyalty points - a currency you print yourself
Why points are a ledger with expiry and liability, and why a balance column is the wrong answer again.
Data & analytics templates
Pipelines, metrics and the lag between event and answer.
Ad serving - an auction inside a page load
Why a system with eighty milliseconds to decide must spend money it cannot yet count.
Analytics pipeline - the lag between an event and the answer
Why a click takes ten seconds to reach one dashboard and until tomorrow to reach the one people trust.
Log aggregation - the index is bigger than the data
Why searching your logs costs thirteen times more than keeping them, and what you can no longer ask once you sample.
Metrics and monitoring - cardinality is the thing that kills you
Why one label with unbounded values takes down the system that was supposed to explain the outage.
Recommendation engine - retrieve a thousand, rank twenty
Why the feed is computed in a hundred milliseconds by a model that is a day out of date.
- Free
Leaderboard - a sorted set and the rank nobody stores
How a sorted set answers top ten and my rank in milliseconds, and why rank is computed rather than stored.
Search autocomplete - an answer before the word is finished
Why suggestions come from a precomputed prefix index, and why freshness is traded for speed on every keystroke.
View counter - counting a million clicks without a million writes
Why a counter on a hot row is batched in memory, and how much of the count you may lose on a crash.
Uptime monitor and status page - checking from outside
Why uptime is measured from many regions outside your network, and why the status page must not share its fate.
A/B testing platform - assignment is the easy half
How users are bucketed deterministically, and why exposure logging and metric pipelines decide whether a result is real.
ETL and the data warehouse - yesterday, correctly
Why batch loads trade freshness for correctness, and how late data and reruns are made safe.
Full-text search - the inverted index and the shard that is slow
How an inverted index answers a query across shards, and why the slowest shard sets every response time.
Location & logistics templates
Geospatial indexes, matching and moving things.
Fleet tracking - 21,600 writes per vehicle per day
Teaches how a continuous position firehose is split into a tiny live picture and an enormous history, and how retention rather than hardware decides what it costs.
Geofencing - many points against many polygons
Teaches how a covering index reduces every-point-against-every-fence to a handful of tests, and why a jittery GPS makes the crossing itself the harder problem.
Maps routing - precompute, then watch it go stale
Teaches how a shortest path over a continental road graph is bought with precomputation, and what live traffic does to work that was done last night.
Proximity search - the index is the design
Teaches how to size a geospatial index against the query it serves, and why the nearest answer is usually in the cell next door.
- Free
Ride matching - the nearest car is the wrong car
Teaches how a geospatial index turns supply and demand into a dispatch decision, and why that decision is an assignment over a batch rather than a nearest-neighbour lookup.
Parking reservation - a spot is a time slot with a location
How spots are booked by time window without double booking, and what happens when a car overstays.
Package tracking - scan events and the promised date
How carrier scan events become one shipment timeline, and why events arrive late and out of order.
Surge pricing - a price set by a map that changes every minute
How supply and demand per map cell set a multiplier, and why the price must be locked when it is shown.
Collaboration templates
Several people editing one thing without losing an edit.
Calendar scheduling - a time that suits five people
Why a meeting time is computed from rules and guesses rather than read from a table, and what that costs.
Code review - the comment is on a line that moved
What it takes to keep a conversation attached to code that is rewritten underneath it while the conversation is still going.
Collaborative editor - two carets in one paragraph
How two people type into one document at the same time without either of them losing a character.
Version control - the commit graph is a DAG
Why history is a graph rather than a list, and what that costs at merge, at fetch and at garbage collection.
Whiteboard sync - the cursors cost more than the drawing
Why a shared canvas is mostly a broadcast problem, and what happens to a shape that two people grab at once.
Kanban board - ordering cards without renumbering them
How cards are reordered with fractional ranks instead of renumbering, and how live updates reach every viewer.
File sync - every laptop is a replica
How files sync across devices by chunk and version, and what a conflict looks like when two laptops were offline.
Multiplayer game server - the server decides what happened
Why an authoritative server with client prediction hides latency, and how a tick rate sets cost and fairness.
Database schemas templates
Entity boards that Generate SQL turns into real DDL.
E-commerce orders
Orders, line items and the price that must not change after checkout.
Multi tenant SaaS
Tenant isolation, and every join that could leak across it.
Learning platform
Courses, lessons, enrolments and the progress that must survive a course being edited.
Warehouse inventory
Stock by location, movements as rows, and why on-hand is a sum rather than a field.
AI & LLM systems templates
Retrieval, model serving and the GPU that sets the bill.
RAG chatbot - the answer is only as good as the retrieval
Why a document chatbot is a search system feeding a model, and how chunking and citations decide trust.
LLM gateway - one API in front of every model provider
How prompts are routed, cached, metered and failed over across providers, and why tokens are the unit of cost.
Vector search - nearest neighbours, approximately
Why similarity search uses an approximate index that trades recall for speed, and how filters break it.
LLM inference serving - the GPU is the bill
How batching, KV cache and streaming turn a scarce GPU into many conversations, and why latency fights throughput.
Opening one
The 6 free boards are written out in full. Every other page states the problem the board solves and what it has to do, and the board itself - the walkthrough, the written pages and the schema - opens in Tierslate: a canvas, a walkthrough player that steps through a diagram one wire at a time, and a schema lens that turns entity boards into SQL.
Designing the screens too? See the free UI mockup examples for web, iOS and Android.
Social & feeds templates
Timelines, follows, fan-out - the read-heavy classics.
Social news feed - fan-out on write or on read
Fan-out on write against fan-out on read, and when each loses.
System design · core
Media feed - the feed serves URLs, the edge serves bytes
Why the feed serves URLs and the edge serves bytes, and who actually pays for the pixels.
System design · core
The professional graph - degrees, and why it is not a join
Why a degree badge on every name is a graph held in memory and searched from both ends, not a join.
System design · deep
Comment trees - one range scan, and four writes per vote
How a whole comment tree comes back in one range scan, and why every vote rewrites what it cached.
System design · deep
The social graph - one edge, written twice
Why every follow is written twice on two shards with no transaction between, and what that drift costs.
System design · core
Home timeline - materialise it, then keep it honest
Why one post is fanned out into hundreds of precomputed timelines, and why the celebrity cannot be.
System design · core
Blog platform - write once, cache everywhere
Why a blog is a read-heavy system where the cache is the product, and what publishing has to invalidate.
System design · starter
Link previews - fetching a stranger's page safely
Why unfurling a pasted URL is a server-side request forgery problem first and a caching problem second.
System design · starter
Reviews and ratings - the average that must not be gamed
Why a star rating is an aggregate maintained on write, and how fake reviews are held back before they count.
System design · core
Content moderation - deciding before everyone sees it
Why moderation is a fast automatic gate plus a slow human queue, and what is shown while it decides.
System design · core
Stories - posts that delete themselves in 24 hours
Why expiry is a read-time filter plus a background sweep, and why the viewer list is the expensive part.
System design · core