Kayavak / The Backend / BE·55 Backend Projects / Deeper
Deeper · The Backend
Backend Projects
The questions the chapter doesn't stop for: why this exists, the model to keep in your head, what changes when an assumption does, how sure we are of each claim, and what's still open. Read it after the chapter; back to the chapter.
Why does this exist?
A backend is judged when things go wrong: under load, when a dependency is slow, when a message arrives twice, when someone sends a request they shouldn't. Each chapter of this volume covered one of those concerns; real services meet all of them in every request. The projects make you combine them, the way the TiffinBox build does stage by stage, so that the question "what happens if this fails?" becomes a habit rather than a chapter.
The mental model
Try it yourself first: write your own model in the Mental Model Explorer, then compare.
A backend project is done when it's correct, observable and survives failure, not when the happy path works. Define those properties first and prove each with a test or a measurement.
| Question | Answer |
|---|---|
| What is it? | Small but complete services that combine the volume's chapters |
| Problem it solves | Turning knowledge of separate techniques into judgement about using them together |
| Parts | API design, persistence, security, async work, resilience, caching, tests, measurements |
| How it works | Start from the requirements and failure cases; build the smallest service that meets them; measure; extend |
| Assumptions | You test failure paths as deliberately as success paths |
| When they change | Services that only ever met the happy path fail in their first real incident |
| Where it fails | Projects that add frameworks without a reason; tests that never exercise failures |
| Related ideas | Every chapter in this volume; TiffinBox's backend stages |
What if?
What if you load-tested only after building everything?
Reason it through, then open
You'd find the bottleneck (a missing index, a pool too small, an N+1 query) at the end, possibly in a design decision that's now expensive to change. Measuring a thin end-to-end slice early tells you where the costs are while the code is still small.
What if you never killed a dependency during testing?
Reason it through, then open
You'd learn how the service behaves without its database or broker during the first real outage, at the worst moment. Stopping a container in a test, injecting latency and replaying duplicate messages turn those unknowns into results you've seen and fixed.
Where the boundary is
| Aspect | Works | Production-ready |
|---|---|---|
| Handles | Valid requests, healthy dependencies | Invalid input, duplicates, slow and failed dependencies, overload |
| Proven by | Manual tries | Tests, measurements, failure injection |
| Visible when broken | No | Logs, metrics and traces say what happened |
How sure are we?
| Claim | How it's known | Where from |
|---|---|---|
| Measuring early finds bottlenecks cheaper to fix | Model | Widely experienced; consistent with performance practice (ch41) |
| Failure injection finds bugs ordinary tests miss | Measured | Reports from chaos-engineering programmes, e.g. Netflix |
| Combined practice improves transfer | Active research | Supported by learning research on whole-task practice |
Still open
How to judge "production-ready" without real users is partly open; load models and failure scenarios are always guesses about the future, which is why the projects ask you to state yours explicitly.
What would change your mind? If a project survived every failure you could inject without changes, add harder ones: a partition, a clock jump, a full disk.
Recall
When is a backend project done?
When it's correct, observable and survives failures, each proven by tests or measurements.
Why measure a thin end-to-end slice early?
To find bottlenecks while design decisions are still cheap to change.
Why inject failures in tests?
To see and fix how the service behaves without its dependencies before a real outage shows you.
Reflect
Be honest with yourself; this stays in your browser. Anything you can't tick yet is what to revisit.