System Design
Loading System Design…
Loading System Design…
The 30 foundations that every system design beginner should know — collected here for quick reference.
Source: AlgoMasterClients request, servers respond. The two-role split that underlies every web, mobile, and API system.
Read on AlgoMasterNumeric label that identifies a machine on a network so packets know where to land.
Read on AlgoMasterPhonebook of the internet — resolves human-readable domains to IP addresses.
Read on AlgoMasterIntermediary that forwards traffic. Forward proxies shield clients; reverse proxies shield servers and enable load balancing, caching, TLS termination.
Read on AlgoMasterTime a request takes end-to-end. Network, disk, and queueing delays all add up — measure p50/p95/p99.
Read on AlgoMasterRequest/response protocol of the web. HTTPS adds TLS for encryption and integrity.
Read on AlgoMasterContract that lets one program talk to another. Clear inputs, outputs, and error semantics.
Read on AlgoMasterHTTP-based API style built around resources and standard verbs (GET, POST, PUT, DELETE).
Read on AlgoMasterQuery language for APIs — clients ask for exactly the fields they need in one round trip.
Read on AlgoMasterDurable, queryable stores for application state. Relational, document, key-value, graph, columnar, time-series.
Read on AlgoMasterSQL: schemas, joins, ACID. NoSQL: flexible schema, horizontal scale, often eventual consistency. Pick by access pattern.
Read on AlgoMasterMake one machine bigger — more CPU/RAM/disk. Simple but capped by hardware and a single point of failure.
Read on AlgoMasterAdd more machines and spread load. Scales further but needs load balancing, statelessness, and careful data partitioning.
Read on AlgoMasterDistribute incoming traffic across servers using strategies like round-robin, least-connections, or consistent hashing.
Read on AlgoMasterSide data structure (often B-tree) that speeds reads on selected columns at the cost of slower writes and extra storage.
Read on AlgoMasterKeep copies of data on multiple nodes for read scaling and failover. Trade-offs: sync vs async, leader vs leaderless.
Read on AlgoMasterHorizontal partitioning of data across machines by a shard key. Scales writes; complicates joins and rebalancing.
Read on AlgoMasterSplit a table by columns into multiple tables. Useful when some columns are large, hot, or accessed independently.
Read on AlgoMasterStore hot data closer to the consumer (in-memory, CDN, browser) to cut latency and DB load. Mind invalidation.
Read on AlgoMasterDuplicate data across tables/documents to make reads cheaper at the cost of write complexity and consistency risk.
Read on AlgoMasterUnder a network partition, a distributed store must choose between consistency and availability. Pick by use case.
Read on AlgoMasterObject stores (S3, GCS, Azure Blob) for large unstructured files — images, video, backups, logs.
Read on AlgoMasterGeographically distributed cache that serves static and cacheable content from a nearby edge node.
Read on AlgoMasterPersistent full-duplex TCP connection over HTTP for low-latency push (chat, live dashboards, multiplayer).
Read on AlgoMasterOutbound HTTP callback fired when an event happens — push instead of poll. Needs retry and signature verification.
Read on AlgoMasterArchitecture style where the system is split into small, independently deployable services with focused responsibilities.
Read on AlgoMasterAsync broker (Kafka, RabbitMQ, SQS) that decouples producers from consumers and smooths bursty workloads.
Read on AlgoMasterCap requests per client/window to protect backends. Common algorithms: token bucket, leaky bucket, sliding window.
Read on AlgoMasterSingle entry point for client traffic — handles auth, routing, rate limiting, observability for backend services.
Read on AlgoMasterProperty that the same request applied multiple times has the same effect once. Vital for retries and exactly-once semantics.
Read on AlgoMaster