📎 Webclip
15 Must-Know Elements of System Design
The post groups system design into a set of building blocks used in distributed systems. It covers how these pieces support scalability, fault tolerance, performance, communication between services, data storage, and visibility into system health.
Reading notes#
- Distributed systems split a system into services that run across different servers or regions to improve scalability, fault tolerance, and performance.
- Message queues store and forward messages for asynchronous communication between services, which decouples microservices and supports independent scaling.
- Caching keeps frequently accessed data in memory so applications can return data faster, reduce latency, and lower database load.
- Task schedulers coordinate batch jobs and background tasks across distributed environments so critical jobs run reliably.
- Scalability lets a system handle higher demand, with vertical scaling adding more resources to existing servers and horizontal scaling adding more servers.
- CDNs serve cached content from geographically distributed servers near users to reduce latency and bandwidth costs.
- Consistent hashing spreads data across nodes while reducing the amount of remapping needed when nodes join or leave.
- Service discovery lets microservices find and communicate with each other dynamically instead of relying on hard-coded IPs.
- DNS turns human-readable domain names into IP addresses for web applications.
- Load balancers split incoming traffic across backend servers using methods such as round-robin, least connections, or weighted distribution.
- API gateways act as a single entry point for microservices and handle routing, authentication, and rate limiting.
- Databases store structured or semi-structured data, with SQL databases emphasizing ACID compliance and complex queries and NoSQL databases emphasizing horizontal scaling and flexible schema.
- Object storage is used for unstructured data such as images, videos, and documents, with durability and availability as key properties.
- Sharding divides a large database into smaller distributed shards based on a key to improve horizontal scalability.
- Replication copies a database to improve availability and fault tolerance, using leader-follower or multi-leader setups.
- Observability relies on monitoring, logs, and traces to make system health visible and help diagnose bottlenecks and failures.
