Basic Principles
Trade-offs
The Trade-off Between Consistency and Availability
The article explains the CAP theorem (Consistency, Availability, Partition tolerance) and the trade-off between consistency (data is always in sync on every node) and availability (the system always responds to requests). In a distributed system you cannot guarantee all three at once; you usually have to choose between C and A when a network partition (P) occurs. This trade-off sets the baseline for the rest of the note. The sections after it collect eight common problems with the solutions usually applied to them, such as caching, async writes, redundancy, load balancing, CDN, object storage, centralized logging, and sharding with indexes. A closing list points to further reading. Source: https://viblo.asia/p/danh-doi-giua-tinh-nhat-quan-va-tinh-san-sang-tradeoff-between-consistency-and-availability-5OXLAvlxVGr
Common Problems and Solutions in System Design
Below are 8 common system design problems and the solutions usually applied to them:
-
Caching – speed up reads
- Problem: a large volume of read queries overloads the database (DB).
- Solution: use caching systems such as Redis or Memcached to store the results of popular queries, reducing DB load and speeding up responses.
-
Async Write & LSM-Tree DB – handle writes efficiently
- Problem: a high write volume bottlenecks the DB and hurts performance.
- Solution: use asynchronous writes through a message queue such as Kafka or RabbitMQ. Use DBs optimized for writes, such as Cassandra and RocksDB (which use the Log-Structured Merge-Tree, LSM-Tree, structure).
-
Redundancy & Failover – increase availability
- Problem: the system has a Single Point of Failure (SPOF) when there is only one server or one critical component.
- Solution: deploy data replication and automatic failover between the primary server (master) and replica servers so the system keeps working when something fails.
-
Load Balancer – distribute load
- Problem: servers get overloaded when traffic increases.
- Solution: use a Load Balancer such as Nginx or AWS Application Load Balancer (ALB) to distribute user requests evenly across multiple servers, so no single server is overloaded.
-
CDN (Content Delivery Network) – reduce latency
- Problem: users geographically far from the main server experience high latency when accessing content.
- Solution: use a Content Delivery Network (CDN) such as Cloudflare or AWS CloudFront to store copies of static files (images, video, CSS, JavaScript) on edge servers close to users, reducing latency and speeding up page loads.
-
Block/Object Storage – manage large files
- Problem: storing large files directly in the DB bloats the DB, slows queries, and makes management difficult.
- Solution: use block storage such as Amazon EBS or object storage such as Amazon S3 for large files. The files' metadata (e.g. path, file name, size) can be stored in the DB.
-
Centralized Logging – manage logs effectively
- Problem: it is hard to search and analyze error logs when the system spans many servers.
- Solution: use a centralized log management system such as the ELK stack (Elasticsearch, Logstash, Kibana) or the EFK stack (Elasticsearch, Fluentd, Kibana) to collect, store, search, and analyze logs from all system components in one place.
-
Sharding & Index – optimize queries
- Problem: slow queries on large DBs.
- Solution:
- Create indexes on fields frequently used in query conditions to speed up lookups.
- Apply sharding (data partitioning) to split a large DB into smaller parts (shards), each stored on a separate node, which spreads load and improves query performance.

References and Tools
- GonnaCrash: 200Lab's browser game. Place components, run traffic, and see which part crashes inside a budget. Play at https://systemdesign.200lab.io/.
- Breakscale: open-source discrete-event simulator. Same canvas in the browser, VS Code, and an MCP server. Repo https://github.com/workersio/breakscale.
- Sys0: Rakesh K's system design course at https://sys0.in/. The syllabus is public. Lessons and labs open after a Google sign-in, and most of the path is still scheduled.
- Syscraft: hosted lab at https://syscraft.app/. Logged out on 2 November 2026, the learn index listed 42 lessons and the challenge index listed 19. Pro on the marketing page was $9 a month.
- The encyclopedia of system design: a compilation of knowledge, concepts, solutions to common problems, and real-world examples. Very useful for preparing for system design interviews.
- System Design the big archive: e0f1a2b3-c4d5-6789-9a0b-c1d2e3f4a5b6.pdf
- System Design and architecture: d6e7f809-1a2b-3c4d-5e6f-708192a3b4c5.pdf
- Prophecy Product Design Cheatsheet: b4c5d6e7-f809-1a2b-3c4d-5e6f708192a3.pdf
- Software Architect & Architecture: Mindset, responsibilities, and what you need to know: a video discussing the role of the Software Architect, the mindset required, the main responsibilities, and the necessary knowledge.
- What is a System Architect (SA)? How to become one: a video explaining the role of the System Architect, the work, and the path to becoming an SA.
- Chuyện anh thợ xây P1 (The Builder's Story, Part 1): BUILD a write-heavy application: part 1 of the series, focusing on building an application with a large volume of data writes.
- Chuyện anh thợ xây P2: batch operations and the "carrying bricks" technique:
- Chuyện anh thợ xây P3: the story of the view counter:
See also: Overview · Technical Solutions · Software Architecture · GonnaCrash · Breakscale · Sys0 · Syscraft