Capstone: Design and Defend a Complete System
Core Concepts (5)
- 1.A complete design links requirements to components and numbers
- 2.Every choice should name what it sacrificed
- 3.Reviews find gaps; explaining out loud exposes weak reasoning
- 4.Failure modes belong in the design, not the postmortem
- 5.Record decisions so others can challenge them
Map to Your Experience
Which of the previous thirteen topics do you understand least well? Plan to give it extra attention in this design.
Design Brief: Design a URL Shortener and Defend It
Learn
This final module ties together everything in the track. A complete design is not a diagram; it is a chain of reasoning from requirements to numbers to components to trade-offs.
Use a repeatable sequence. First, clarify requirements: functional behaviour, non-functional targets with numbers, and constraints. Second, estimate: requests per second, storage, and bandwidth. Third, sketch the high-level components and the API. Fourth, define the data model and choose stores based on access patterns. Fifth, address scale with caching, load balancing, replication, or partitioning, only as far as the numbers demand. Sixth, address failure, security, and observability. Finally, record the key decisions.
Take a URL shortener as the example. The functional core is tiny: create a short code for a long address, and redirect from the code. The interesting part is the non-functional side. Reads outnumber writes by perhaps one hundred to one, redirects must be fast, and a link that worked yesterday must work forever. Those facts point to a simple relational or key-value store for the mapping, a cache in front for hot links, and replicas for durability.
Each choice has a cost, and naming it is the discipline. Random codes avoid guessing but need collision checks. A cache speeds redirects but can serve a deleted link until the TTL expires. An asynchronous analytics queue protects redirect latency but makes click counts approximate.
A design review is a conversation in which others probe your reasoning. Practise questions such as: what happens when the database is down? What is the busiest second, and does this survive it? How could someone abuse this? What did you decide not to build? If you cannot answer, that is a finding, not a failure.
Finish with a short decision record for the three most important choices: the context, the options, what you chose, and what you gave up. Written decisions let teammates and your future self challenge them with facts.
Map
Before designing, list the five questions a reviewer is most likely to ask about a URL shortener, and note which earlier day of this track gives you the tools to answer each.
Design
Design a URL shortener for 100 million new links a month with p95 redirect latency under 100 milliseconds. Deliver requirements with numbers, an estimation, a component diagram, the API, the data model, the scaling approach, failure handling, security controls, and three decision records with sacrificed alternatives. Then review it yourself by answering the five reviewer questions from the Map step honestly.
Requirements
- •State functional and non-functional requirements with numbers
- •Show components, data model, and API
- •Cover scaling, failure, and security
- •Record 3 decisions with trade-offs
Constraints
- •Target 100 million new links per month
- •Redirect latency under 100 milliseconds at p95
- •Team of six engineers
Must Cover
Trade-off Axis
simplicity vs scale and availability
Referenced Patterns
Competencies Advanced
Ready to Design?
Open this day in the Design Studio. The studio follows this track: its days, concepts, patterns and trade-offs are loaded, and you keep one design across the whole track.
Open in Studio →