Skip to content

    System Design

    Capstone Brief: A Scoped Distributed System

    Scope a ShopStream capstone: requirements, non-goals, testable acceptance criteria, deliverables and a scoring rubric, ready for a design doc and report.

    By Published 12 min read

    Share

    Standard lessonadvancedSpring Boot labBackend System Design

    Before this: The Backend Architect Interview Framework

    What you'll learn: By the end of this lesson you will be able to cut a large system down to a capstone you can finish, write requirements as acceptance criteria that can fail, state non-goals so the scope stays honest, list the evidence a reviewer will ask for, and score your own work against a rubric before anyone else does.

    A builder is handed a plot of land and a plan that says "a house". Before the first brick, a good one asks which rooms, how many people, what budget, and what the council inspector will check on the last day. A plan that cannot be checked gets argued about at the end. A plan with a checklist gets finished.

    A capstone brief plays that part. The earlier lessons each taught one idea. A capstone asks you to use several together, on one small system, and to show evidence that they work. This lesson is the brief; the next one, Capstone: Design Doc, Load Test and Failure-Injection Report, covers the document and the evidence. The interview framework lesson that precedes the capstone in the plan is not linked yet.

    Verified against the Google SRE book chapter on service level objectives, RFC 9110, the Spring Framework testing documentation and the Grafana k6 documentation on 2026-12-02. The numbers in the acceptance criteria are illustrative choices of this course, not industry standards.

    The core idea

    A capstone is a small system with a written definition of done. The size is limited on purpose (one slice of one system), and the definition of done is a list of acceptance criteria, each one a measurable statement that a run can prove wrong.

    Three illustrations run through the lesson:

    • Minimal example: one vague requirement ("checkout must be fast") rewritten as a criterion that can fail.
    • Realistic example: the ShopStream checkout slice, with its scope, requirements and criteria.
    • Failure example: a brief with no non-goals, which grows until nothing is finished.

    What is in the capstone

    The capstone builds on ShopStream, the course's grocery marketplace. It is an educational reference design, not a real company. The earlier stages designed the whole system; the capstone builds one slice of it: checkout and order intake. A shopper submits a cart, the service looks up current prices, takes the order into a bounded queue and answers at once; a later step, outside the slice, would charge the card and tell the store.

    The course's shared illustrative numbers apply. Peak browsing is about 2,300 requests per second and peak checkouts about 58 per second, derived from 500,000 orders a day in Stage 1. The capstone uses the 58.

    The capstone slice inside ShopStreamShoppers to Checkout service; Checkout service to Order gate (accept); Checkout service to Catalogue lookup (prices); Checkout service to Price cache (fallback); Checkout service to Evidence (counts)Shoppers: 58 checkouts/s peakShoppers58 checkouts/speakCheckout service: the capstoneCheckoutservicethe capstoneOrder gate: bounded queueOrder gatebounded queueCatalogue lookup: pricesCataloguelookuppricesPrice cache: stale fallbackPrice cachestale fallbackEvidence: load, failureEvidenceload, failureacceptpricesfallbackcounts

    Figure 1. The slice. How to read this: the capstone is the accent box and the three things it touches. The red dashed edge is the fallback the failure experiments will exercise. The green box is the evidence the capstone produces, which is as much a part of the deliverable as the code.

    Everything else in ShopStream is out of scope. The brief says so in a list, because a boundary that is not written down moves.

    In scope Out of scope (non-goals)
    Checkout request, validation, a 202 answer or a 503 Real card payments and a real ledger
    Price lookup with a stale-copy fallback Search, recommendations, notifications
    A bounded order queue with early rejection Courier assignment and tracking
    Idempotency for repeated checkouts Sign-in and authorisation
    Load and failure evidence from a deterministic model Multi-region, Kubernetes, containers

    Each non-goal is a real part of ShopStream: Stage 6 designs the payments ledger, Stage 7 search and notifications, and Stage 10 security and operations. Leaving them out is a scoping decision, not a claim that they do not matter.

    Requirements that can fail

    A requirement is only useful if a test could prove it wrong. The k6 documentation makes the same point about performance work: its test-types page describes a load test as one that assesses performance "under expected normal conditions", and the Google SRE book defines an SLO as "a target value or range of values for a service level that is measured by an SLI", a measured indicator. Both ask for a number and a measurement.

    Minimal example. Take "checkout must be fast". It cannot fail, because nobody said how fast, for how many users, or measured how. Rewrite it:

    At 58 checkouts per second, no request is rejected, and a checkout that is accepted gets a 202 answer.

    Now one run proves it wrong. This course's capstone keeps five functional requirements and five non-functional ones.

    Id Requirement Kind
    F1 A valid cart is accepted and gets a 202 answer with an order id Functional
    F2 An invalid cart gets a 400 answer that names the problem Functional
    F3 Prices come from the catalogue lookup, not from the request Functional
    F4 Repeating a checkout with the same idempotency key does not create a second order Functional
    F5 An order's status can be read back Functional
    N1 The expected peak is accepted in full Non-functional
    N2 Overload is rejected early and the system recovers Non-functional
    N3 A failing catalogue does not stop checkout Non-functional
    N4 Failure experiments are limited by a cap and a stop condition Non-functional
    N5 A retried request does not run its work twice Non-functional

    The status codes are chosen with care. RFC 9110 says the 202 (Accepted) status code "indicates that the request has been accepted for processing", and that the processing may not have finished. A 503 (Service Unavailable) "indicates that the server is currently unable to handle the request" and may carry a Retry-After header. A capstone that returns 200 for a queued order says something false about what has happened. The problem details lesson shows the error body for F2.

    Acceptance criteria

    An acceptance criterion turns a requirement into a check with a threshold and a place the number comes from. The capstone has seven. They are the rows of the report that the next lesson produces.

    Id Criterion Threshold (illustrative) Covers
    AC-1 Expected peak is accepted 0 rejected at 58 per tick N1
    AC-2 Overload is rejected early and drains queue never above its limit; empty at the end N2
    AC-3 Catalogue errors do not stop checkout at least 99% answered N3
    AC-4 Blast radius is capped at most 10 injected faults N4
    AC-5 A stop condition aborts the fault aborted within 40 requests N4
    AC-6 A retried request runs its work once 0 duplicate executions F4, N5
    AC-7 Checkout p95 on a deployed stack a number you set in the design doc N1

    Two details matter. The thresholds are illustrative: pick your own, write them down before the run, and defend them. And AC-7 cannot be measured by a counting model, because a model has no clock. A good report says "not measured, needs a deployment" instead of guessing. The SRE book advises preferring percentiles to averages for latency, because an average hides slow outliers; that is why AC-7 names a p95.

    Deliverables and how they are scored

    The reviewer reads evidence, so each deliverable names the evidence.

    flowchart LR accTitle: From brief to report accDescr: The brief and scope feed a design doc. The design doc drives the build and tests. The build is exercised by a load run and a failure-injection run. Both produce counts that fill the acceptance table in the final report. B["Brief and scope
    D1"] --> DD["Design doc
    D2"] DD --> BU["Build and tests
    D3"] BU --> L["Load run
    D4"] BU --> F["Failure run
    D5"] L --> R["Report with
    acceptance table
    D6"] F --> R

    Figure 2. The deliverables. How to read this: the brief comes first and the report last. Load and failure runs are separate because they answer different questions; the report is where their counts meet the criteria.

    The rubric below is this course's own, with illustrative weights. A reviewer, or you, scores each row from 0 to the weight.

    Area Weight Full marks look like
    Scope and requirements (D1) 15 Non-goals listed, every requirement testable
    Design doc and decisions (D2) 25 Alternatives considered, trade-offs written, risks named
    Correctness and tests (D3) 20 Each F requirement has a test; tests are deterministic
    Load evidence (D4) 15 A profile per question, criteria written before the run
    Failure evidence (D5) 15 Hypotheses, a cap, a stop condition, findings recorded
    Operability and honesty (D6) 10 Unmeasured items marked, no claim beyond the evidence

    Notice that honesty is scored. A report with seven green rows and no "not measured" row is more suspicious than one with a failure in it.

    Scoping a requirement in or out

    Every extra requirement costs design, code, tests and evidence. A short rule keeps the list honest.

    flowchart TD accTitle: Should this requirement be in the capstone accDescr: Ask whether a failing run could prove the requirement wrong. If not, rewrite it. Then ask whether it exercises a concept the capstone is meant to show. If not, it is a non-goal. Then ask whether it fits the time budget. If not, cut it and record it as a non-goal. A{"Could a run
    prove it wrong?"} -->|no| W["Rewrite it with
    a number"] W --> A A -->|yes| B{"Does it exercise
    a concept the
    capstone teaches?"} B -->|no| N["Non-goal"] B -->|yes| C{"Fits the
    time budget?"} C -->|no| N C -->|yes| I["In scope"]

    Figure 3. The scoping rule. How to read this: a requirement is in only if it passes all three questions. A requirement that fails the first is rewritten, not dropped. Everything that fails the second or third goes on the non-goals list with a reason.

    Failure example. A brief that said "build ShopStream" with no non-goals. Each review added a wish: search, then notifications, then multi-region. By the deadline there was a half-built checkout, no load run and nothing to score. The fix is boring and works: a written non-goals list, signed off before the build starts, changed only by an explicit decision.

    One request through the slice

    The sequence below is the realistic path the requirements describe. It is the shape the design doc will expand.

    sequenceDiagram accTitle: One checkout through the capstone slice accDescr: A shopper sends a checkout with an idempotency key. The service checks the key, looks up prices from the catalogue, falling back to a cached price if the lookup fails, offers the order to the gate and answers 202 or 503. participant S as Shopper participant C as Checkout service participant K as Catalogue lookup participant G as Order gate S->>C: POST checkout (idempotency key) C->>C: key seen before? C->>K: current prices alt lookup fails K--xC: error or timeout Note over C: use stale cached price else lookup ok K-->>C: prices end C->>G: offer order alt queue has room G-->>C: accepted C-->>S: 202 with order id else queue full G-->>C: rejected C-->>S: 503 end

    Figure 4. A checkout. How to read this: two branches matter. The lookup can fail and the service still answers, which AC-3 tests. The queue can be full and the service answers 503 at once instead of waiting, which AC-2 tests. The first step, the key check, is what AC-6 depends on.

    Trade-offs

    Choice Gain Cost Wrong when
    Narrow slice, deep evidence Finishes; every claim backed by a run Much of ShopStream is untouched The slice does not exercise the concepts you wanted
    Wide slice, shallow evidence A broader tour Nothing is proved; reports turn to opinion You cannot defend each number
    Counting model for load Deterministic, runs anywhere No latency, no real saturation You claim it is a benchmark
    Deployed environment for load Real latency and saturation Cost, noise, setup time You have no time to read the results
    Strict thresholds Clear pass or fail Easy to miss You picked them after seeing the data
    Loose thresholds Easy to pass Proves little They are not tied to a user-visible goal

    In practice: scoping the checkout slice for a three-week capstone

    This is a realistic scenario, not a case history.

    This is an educational scenario on ShopStream; nothing in it describes a real team. The 58 checkouts per second is the shared illustrative figure.

    The situation

    A learner has three weeks and a laptop with no Docker. They must show a design for a distributed system, tests, a load result and a failure result. The first draft of the brief reads "implement checkout, payments, inventory and notifications for ShopStream".

    Starting architecture

    The draft has four services, a broker and a database, none of which can be started without containers on this laptop. Nothing in the draft says what finished looks like.

    Options considered

    Option Gain Cost Risk
    A. Keep the four-service plan Looks complete Three weeks cannot cover it No evidence for any part
    B. Checkout slice, in-process stand-ins Finishes; every criterion testable Stand-ins are not real services Reader mistakes the model for a measurement
    C. Payments only, in depth A deep ledger study Skips load and failure work The rubric rows for D4 and D5 are empty

    The decision

    Option B. The brief lists five non-goals, seven acceptance criteria with thresholds fixed before the first run, and one row (AC-7) marked as "not measured, needs a deployment". The ledger and notifications stay as named non-goals with a pointer to the stage that designs them.

    Rollout and verification

    Week one: the brief and the design doc. Week two: the build, with a test per functional requirement, then the load run. Week three: the failure run and the report. The reviewer scores the rubric from the report alone, checking that every threshold was written before the run.

    The 2 a.m. failure

    The review passes, and the learner later demos the work. A repeated checkout, sent by a client that timed out and retried, creates a second order. Nothing in the first draft named duplicates as a risk, and AC-6 did not exist. First checks: is there an idempotency key, where is it stored, what happens when the response is lost. The mitigation is the idempotency design from the idempotency keys lesson. The brief-level fix is a criterion for it, so the next run reports the gap instead of the demo discovering it.

    Architect's notes

    • Write the definition of done first. Thresholds chosen after the data are decoration.
    • Write non-goals as a list, with a reason each. A non-goal with no reason gets reopened.
    • Mark what you cannot measure. "Not measured" is a finding; a guessed number is a defect.
    • Cover the unglamorous requirement. Duplicates on retry are less exciting than sharding and more likely to be asked about.
    • Keep one slice deep. A reviewer remembers the evidence, not the box count.

    Common mistakes

    • No non-goals. The scope grows until nothing is finished.
    • Requirements without numbers. "Fast", "reliable" and "scalable" cannot fail.
    • Thresholds set after the run. The check becomes a description.
    • Calling a counting model a benchmark. It has no clock.
    • Scoring only the code. The rubric gives most of its weight to decisions and evidence.
    • Only green rows. A report that cannot fail has not been tested.

    Key takeaways

    • A capstone is a small slice of a system plus a written definition of done.
    • Rewrite every requirement until one run could prove it wrong.
    • Acceptance criteria carry a threshold, written before the run, and a source for the number.
    • Non-goals protect the scope; list them with reasons.
    • Use the right status codes: 202 for accepted, 503 for overloaded.
    • Some criteria cannot be measured by a model; say so in the report.

    Practice exercises

    Exercise 1 (20 min). Rewrite "the checkout page must stay up during a sale" as two acceptance criteria with thresholds and a place each number comes from.

    Exercise 2 (30 min). List five non-goals for a capstone on a different system of your choice, with a one-line reason each.

    Exercise 3 (30 min). Score a draft brief of your own against the rubric table. Which row is weakest, and what would raise it?

    Exercise 4 (45 min). Add a criterion for a requirement this brief leaves out, such as a read-after-write check on order status (F5). Say how a run would prove it wrong.

    Official documentation

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments