Putting it together
A repeatable method for turning requirements into a scalable design, using everything in this course.
18 min readStep 1: requirements and numbers
Begin with what the system must do and how much. List the core features and the few requests that matter most, such as post a photo and view a feed. Then estimate: daily users, reads and writes per second at peak, the read-to-write ratio, object sizes, storage per year and bandwidth. Add the non-functional targets: p99 latency, availability, and how stale or how lost data may be. These numbers are your test cases; in SystCode they are the scenarios the Feedback panel will simulate against your design.
Step 2: the simplest design that works
Draw the request path for each key request with the fewest components that meet the numbers: clients, DNS, a load balancer, a stateless API tier and one database, plus object storage if there are files. Define the main API endpoints and the data model, and check that each query has an index. Many easy problems are solved at this stage. Resist adding queues, shards and multiple caches before the estimates ask for them: every component adds cost, latency and failure modes.
Step 3: scale the bottleneck
Compare the load on each component with its capacity and fix the biggest gap first, then repeat. Change one thing at a time and re-run the simulation, because fixing one bottleneck usually moves the pressure to the next component downstream. Each symptom below maps to a tool from an earlier lesson.
- Too many requests for the API tier: add instances behind the load balancer
- Static or public content far from users: add a CDN
- Repeated reads hammering the database: add a cache with a clear invalidation rule
- Reads still too high: add read replicas and route lag-tolerant queries to them
- Writes or storage beyond one primary: shard on a well-chosen key
- Large files through the API: switch to presigned uploads and object storage
Step 4: failure and trade-offs
Walk the path again and ask what happens when each component fails. Replicate every stateful component, make sure acknowledged writes are durable, decide what the system does with a cold cache, and state your RPO and RTO. Finally, write down the trade-offs you chose: which data may be stale and for how long, where you accepted eventual consistency, and what you would change at ten times the load. A design with explicit reasoning is worth more than one with more boxes, and it is what the capstone challenges in this course ask you to show.
Key takeaways
- Start from requirements and peak numbers; they become your test cases
- Build the simplest design first, then scale the biggest bottleneck one step at a time
- Check every component for failure: replicas, durability and cold-cache behaviour
- Write down your trade-offs, including staleness, consistency and what changes at 10x
Sign in to track lessons and earn badges.