CHAPTER 37

Cheat-Sheets, Glossary and Study Plan

Quick-reference tables, a glossary, practice questions and a 12-week plan

Source: PDF pp. 102–107

Core PDF content

PDF page 102Cheat-sheet 1: technology selection p. 102

NeedTypical choicesPick when
Relational OLTPPostgreSQL, MySQL, Aurora, Cloud SQLDefault; transactions, joins, flexible queries
Massive KV / wide-columnDynamoDB, Cassandra, ScyllaDB, BigtableKnown access patterns, huge scale, multi-region writes
Document storeMongoDB, Firestore, CouchbaseFlexible schema, nested documents
Distributed SQLSpanner, CockroachDB, TiDB, YugabyteDBHorizontal scale with strong consistency
Cache / counters / locksRedis, Memcached, DragonflySub-ms reads, rate limits, leaderboards, sessions
SearchElasticsearch / OpenSearch, Solr, TypesenseFull-text, facets, log search
Vector searchpgvector, Qdrant, Weaviate, Milvus, Pinecone, FAISSEmbeddings for RAG / recommendations
Object storage / lakeS3, GCS, Azure Blob; Iceberg, Delta, HudiMedia, backups, datasets, lakehouse
Message queueSQS, RabbitMQ, Pub/SubJob queues, decoupling
Event log / streamingKafka, Pulsar, Redpanda, KinesisHigh-throughput events, replay, stream processing
Stream processingFlink, Kafka Streams, Spark StreamingWindows, joins, real-time features
Batch / orchestrationSpark, dbt, Airflow, Dagster, TemporalETL, scheduled pipelines, durable workflows
OLAPBigQuery, Snowflake, Redshift, ClickHouse, Druid, PinotAnalytics, dashboards, real-time aggregates
Load balancing / edgeNGINX, Envoy, HAProxy, cloud LBs, CDN (CloudFront, Fastly, Cloudflare)L4/L7 routing, TLS, caching, DDoS
Coordinationetcd, ZooKeeper, ConsulLeader election, config, locks
ObservabilityPrometheus, Grafana, OpenTelemetry, Loki / ELK, Jaeger / TempoMetrics, logs, traces, alerts
ML platformMLflow, Kubeflow, Feast, KServe, Triton, RayTracking, features, serving, distributed compute
LLM servingvLLM, TensorRT-LLM, SGLang, TGI; managed model APIsSelf-hosting vs hosted inference
LLM appsLangGraph, LlamaIndex, DSPy, Langfuse, MCP serversOrchestration, retrieval, tracing, tool integration

PDF page 103Cheat-sheet 2: symptom to remedy p. 103

SymptomFirst things to try
DB CPU high, reads dominateAdd indexes, cache hot reads, read replicas, CDN for static data
DB writes saturatedBatch writes, queue + async, partition/shard, LSM-based store, reduce indexes
Hot key / celebrity userLocal cache, key splitting, replicate hot items, request coalescing
Cache stampede after expirySingle-flight, jittered TTL, stale-while-revalidate, early refresh
High tail latency (p99)Timeouts, hedged requests, fewer fan-outs, isolate noisy neighbours, load shedding
Cascading failuresCircuit breakers, bulkheads, backpressure, retry budgets with jitter
Duplicate processingIdempotency keys, dedupe table, outbox + idempotent consumers
Consumers laggingMore partitions/consumers, batch, fix slow handler, backpressure, DLQ poison messages
Stale reads after writeRead-your-writes routing, read from leader, version tokens
Cross-service consistencySaga, outbox, idempotent steps, reconciliation jobs
(AI) LLM too slowStream, shorter prompts, prefix caching, smaller model, speculative decoding, parallel tool calls
(AI) LLM too expensiveRoute to smaller models, prompt caching, shorter outputs, batch APIs, distil / fine-tune a small model
(AI) HallucinationsRAG with citations, rerank, constrain format, abstention, verification step, better evals
(AI) Model quality decayingCheck data drift and label delay, retrain on fresh data, fix features, slice analysis

Cheat-sheet 3: classic trade-offs p. 103

ChoiceOption AOption BDecide by
Consistency vs availabilityStrong (CP)Eventual (AP)Cost of stale vs unavailable data
Latency vs throughputSmall batches, immediateLarge batches, amortisedUser-facing vs offline work
SQL vs NoSQLJoins, transactionsScale, flexible modelAccess patterns, size, team skills
Push vs pull (fan-out)Precompute on writeCompute on readRead/write ratio, follower skew
Sync vs asyncSimple, immediate resultDecoupled, resilientNeed for an answer now
Normalise vs denormaliseSingle source of truthFast reads, duplicationRead-heavy and tolerance for inconsistency
Monolith vs microservicesSimplicity, one deployIndependent scale and teamsOrg size and domain boundaries
Batch vs streamAccuracy, simplicityFreshnessLatency requirement of the decision
Cache write-through vsConsistent, slower writesFast writes, loss riskDurability need

write-back

(AI) Prompt vs RAG vs           Cheap, flexible                       Fresh/private facts; behaviour change      Gap shown by evals

fine-tune

(AI) API vs self-hostFrontier quality, no opsControl, privacy, unit cost at scaleVolume, privacy, latency, team
(AI) Large vs small modelQuality, reasoningLatency and costRouting by task difficulty

PDF page 104Glossary p. 104

TermMeaningTermMeaning
ACIDAtomicity, consistency, isolation, durability of transactionsLoad sheddingDropping excess work to protect the system
AgentLLM in a loop that plans, calls tools and observes resultsLoRAParameter-efficient fine-tuning with low-rank adapters
AnycastMany servers share one IP; routing sends users to the nearestLSM treeWrite-optimised log-structured storage engine
API gatewayEdge service for auth, rate limits, routingMCPOpen protocol connecting AI apps to tools and data
BackpressureSignal that makes producers slow down when consumers lagMerkle treeHash tree for efficient difference detection
Bloom filterProbabilistic set; no false negatives, some false positivesMLOpsPractices to build, deploy and monitor ML reliably
BM25Keyword relevance scoring function (improved TF-IDF)MVCCConcurrency via multiple row versions
BulkheadResource isolation so one failure cannot exhaust everythingOutboxWrite event with the data in one transaction, then publish
CAPUnder partition choose consistency or availabilityp9999th-percentile latency
CDCChange data capture: stream of committed DB changesPACELCCAP extended with latency/consistency trade-off when no partition
CDNGeo-distributed edge cachesPartitioningSplitting data across nodes (sharding)
Circuit breakerStops calls to a failing dependency, probes for recoveryPoint-in-time joinJoin features as they were at each label timestamp
Concept driftRelationship between inputs and target changes over timePrefill / decodeLLM phases: process prompt / generate tokens
Consistent hashingKey placement on a ring with minimal remappingPrompt cachingReusing computation for an identical prompt prefix
Context windowMaximum tokens an LLM can attend toPrompt injectionMalicious instructions hidden in model inputs
CQRSSeparate write and read modelsPSIPopulation stability index, a drift metric
CRDTData type that merges concurrent updates without coordinationQuantisationLower-precision weights for smaller, faster models
Data driftInput feature distribution shifts from trainingQuorumMajority needed for a decision; W + R > N
DLQDead-letter queue for messages that repeatedly failRAGRetrieve evidence, then generate grounded answers
DPO / RLHFMethods to align models with human preferencesRaft / PaxosConsensus algorithms
EmbeddingDense vector capturing semantic meaningRead repairFix stale replicas when a read reveals divergence
Eventual consistencyReplicas converge if updates stopRerankerSecond-stage model that reorders retrieved candidates
Exactly-onceAt-least-once delivery plus idempotent processingRPO / RTOMax tolerable data loss / downtime
Fan-outOne event delivered to many recipientsSagaSeries of local transactions with compensations
Feature storeShared offline/online feature definitions and storageService meshSidecar proxies for service-to-service traffic
Fencing tokenIncreasing number to reject stale lock holdersSLI / SLO / SLAIndicator, internal objective, customer contract
Fine-tuningFurther training of a model on task dataSpeculative decodingDraft-and-verify to speed up generation
GossipPeer-to-peer state disseminationSplit brainTwo nodes both think they are leader
GuardrailsChecks and constraints around model inputs/outputs/actionsTail latencyHigh-percentile response times
HallucinationFluent but unsupported or false model outputTemperatureSampling randomness control
Hedged requestDuplicate request after a delay to cut tail latencyTTFTTime to first token
HNSWGraph-based ANN indexTwo-phase commitAtomic commit protocol across participants
IdempotencyRepeating an operation has the same effect as onceTraining-serving skewFeatures differ between training and inference
Inverted indexTerm to document postings for searchVector clockPer-node counters detecting concurrent updates
TermMeaningTermMeaning
KV cacheStored attention keys/values for generated tokensVector databaseStore optimised for similarity search over embeddings
Lamport clockLogical clock giving causal orderingWALWrite-ahead log for durability and replication
Leader electionChoosing one coordinator among nodesZero trustAuthenticate and authorise every request
LinearizabilityStrongest consistency: operations appear instantaneous

Practice questions p. 105

Classic system design

  • Design a URL shortener, pastebin, or distributed ID generator.
  • Design a news feed, Twitter, or Instagram.
  • Design WhatsApp / Slack / a group chat system.
  • Design YouTube / Netflix; design a live-streaming platform.
  • Design Uber / Lyft / a "nearby friends" or proximity service.
  • Design Google Drive / Dropbox; design a collaborative editor (Google Docs).
  • Design a web crawler; a search engine; typeahead.
  • Design a rate limiter; an API gateway; a distributed cache; a distributed lock service.
  • Design a key-value store; a message queue; a metrics and monitoring system; a job scheduler.
  • Design a ticketing / flash-sale system; a payment system; a digital wallet; a hotel booking system.
  • Design a notification system; an email service; a leaderboard; a top-K / trending service.
  • Design an ad-click aggregation pipeline; a log aggregation system.

AI system design p. 105

  • Design a recommendation system for a video / e-commerce / music app (retrieval + ranking + cold start).
  • Design a fraud, spam or abuse detection system.
  • Design a search ranking system with hybrid retrieval.
  • Design an ML platform (feature store, training, registry, serving, monitoring) for a company.
  • Design a ChatGPT-like assistant and its GPU serving fleet.
  • Design enterprise document Q&A with permissions (RAG).
  • Design an AI coding assistant; a customer-support agent; a voice assistant; a text-to-image service.
  • Design a content-moderation pipeline using ML and LLMs plus human review.
  • Design an LLM evaluation and monitoring platform; a prompt-management system; an LLM gateway.
  • Design a semantic caching layer; a document-ingestion pipeline; a multi-agent research assistant with tools and budgets.

PDF page 106A 12-week plan p. 106

WeekFocusOutput to produce
1Ch. 1-3: framework, networking, estimationMemorise latency numbers; do 10 estimation drills
2Ch. 4-5: load balancing, caching, CDNDraw LB + cache + CDN architecture from memory
3Ch. 6: databases, indexing, replication, shardingChoose stores for 5 scenarios and justify
4Ch. 7-8: distributed theory, messagingExplain CAP, quorum, Raft, saga, Kafka in 2 minutes each
5Ch. 9-10: APIs, security, resilience, deploymentDesign a rate limiter; write a failure-mode table
6Ch. 11-12 + cases 13-14URL shortener and key-value store, timed, no notes
7Cases 15-18: feed, chat, notifications, videoTwo timed mocks; get feedback
8Cases 19-24: ride-hailing, typeahead, crawler, storage, ticketing, analyticsTwo more mocks; review weak areas
9Ch. 25-28: ML foundations, features, serving, recommendersDesign a recommender and a fraud system on paper
10Ch. 29-30: LLM inference, embeddings, RAGSize a GPU fleet; design a RAG system with an eval plan
11Ch. 31-33: agents, LLM apps, tuning, evals, safetyDesign an agent with guardrails; write an eval suite outline
12Ch. 34-37: AI case studies, playbook; full mocksThree full mock interviews (2 classic, 1 AI); fix gaps

Going deeper (primary sources) p. 106

This guide aims to be self-contained, but everything in it is grounded in a small set of foundational works. If you want the original arguments and details:

  • Books: Designing Data-Intensive Applications (Kleppmann); Site Reliability Engineering (Google); System Design Interview vols. 1-2 (Xu); Designing Machine Learning Systems and AI Engineering (Huyen).
  • Distributed systems papers: Google File System, Bigtable, Spanner; Amazon Dynamo; Kafka; Raft ("In Search of an Understandable Consensus Algorithm"); Chord / consistent hashing.
  • ML and LLM papers and posts: "Hidden Technical Debt in Machine Learning Systems"; "Attention Is All You Need"; PagedAttention (vLLM); FlashAttention; LoRA; DPO; "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks"; ReAct; Anthropic's "Building effective agents"; the MCP specification.
  • Practice beats reading: build a small version of two or three designs (a cache-backed API, a Kafka consumer pipeline, a RAG app with an eval set). Operating something, even a toy, turns vocabulary into judgement.

Review questions for this chapter have not been written and reviewed yet. The chapter text above is the full source content.

References

System Design & AI System Design: The Complete Guide — 2026 Edition, pp. 102–107.

Tip: use ← and → keys to move between chapters.