Production Checklists, Decision Maps, Glossary, and Next Steps
Expert backend engineering is the ability to choose the simplest system that meets evidence-based requirements, preserve correctness as it evolves, and recover when assumptions fail. This reference turns the book into reusable decisions and launch checks. It is not a substitute for threat models, tests, drills, or current primary documentation.
What should you choose first?
Need
Start with
Add complexity when evidence shows
HTTP backend
FastAPI modular monolith
independent service ownership/scale/isolation is required
Durable business truth
PostgreSQL
a different consistency/data model is truly required
Search
PostgreSQL text search
advanced relevance, scale, or operations justify dedicated search
Vector retrieval
PostgreSQL + vector extension
scale/capability/SLO justify a dedicated vector system
Temporary shared state
nothing or process-local cache
Redis solves measured shared latency/coordination need
Tenant scope exists in schema, queries, cache, jobs, files, retrieval, and exports.
Migrations pass fresh install, upgrade, load/lock review, and rollback/roll-forward plan.
Backup and isolated restore meet RPO/RTO.
Retention, correction, export, and derivative deletion are implemented.
Security
Threat model covers API, supply chain, AI, MCP, tools, and operators.
Identity uses standard validation; authorization is resource-specific.
Secrets are short-lived where possible, rotated, redacted, and absent from artifacts.
Inputs, files, egress, bodies, time, concurrency, and spend are bounded.
Consequential tools use exact approval, idempotency, and audit.
Reliability and operations
Deadlines, retries, breakers, bulkheads, queues, and degraded modes are tested.
Liveness/readiness/startup mean different truthful things.
Logs, metrics, traces, SLOs, alerts, dashboards, and runbooks exist.
Capacity and noisy-tenant tests protect downstream limits.
Canary, kill switch, full-version rollback, and incident roles are rehearsed.
AI quality
Provider gateway, prompt, schema, model alias, index, and policy are versioned.
Offline dataset has normal, slice, failure, abstention, and adversarial cases.
Retrieval, citations, generation, tools, safety, latency, and cost are measured separately.
Human review and feedback are meaningful, not ceremonial.
Online drift and configuration changes are observable.
Incident quick checklist
Declare severity, commander, communication channel, and impact.
Stabilize: rollback, shed load, disable the feature, revoke credentials, or fail over.
Preserve timestamps, traces, audit, version set, and evidence.
Communicate facts and next update time.
Diagnose using hypotheses and discriminating tests.
Recover and verify user, data, security, AI-quality, and cost signals.
Reconcile ambiguous jobs/tool effects before retry.
Review system causes, assign actions, and verify their effectiveness later.
Glossary
Adapter: implementation connecting an application port to external technology.
Aggregate: domain consistency boundary changed as one unit.
AI run: durable record of one model/workflow operation and its evidence.
Backpressure: mechanism that slows or rejects producers when consumers are saturated.
Circuit breaker: control that temporarily stops calls to a failing dependency.
Context: selected instructions and data supplied to a model for one operation.
Cursor pagination: continuation based on a stable ordered key rather than an offset.
Embedding: numeric representation used for similarity operations; not authority or truth.
Evaluation: reproducible measurement of AI behavior against cases and criteria.
Fencing token: monotonically increasing token that lets a resource reject a stale lock owner.
Idempotency: repeated equivalent command produces one intended effect/outcome.
Inbox/outbox: durable patterns for deduplicating consumed events and publishing committed events.
MCP: protocol for AI hosts to discover and use server capabilities under host policy.
Migration: versioned transformation of database schema or data.
Port: application-owned interface describing a required capability.
RAG: retrieval of external evidence to support model generation.
RPO/RTO: maximum tolerable data loss and recovery time.
SLO: measurable reliability target for a user-visible capability.
Structured output: model result constrained to an application-owned schema.
Tenant: isolated customer or organization context.
Tool: typed capability a model may propose and application policy may execute.
Trace: correlated record of work across process and service boundaries.
Unit of work: owner of one atomic transaction across repositories.
Vector index: search structure for approximate or exact similarity over embeddings.
What is the mastery path after this book?
Rebuild Capstone 1 without referring to the implementation.
Operate Capstone 2 for several weeks with synthetic traffic and scheduled failures.
Publish Capstone 3's evaluation methodology and compare one controlled change.
Red-team Capstone 4 with a teammate who did not build it.
Contribute a fix, test, or documentation improvement to one dependency you rely on.
Read PostgreSQL query plans and production traces weekly.
Write ADRs before adding systems; revisit them when triggers fire.
Teach one chapter. Teaching reveals unexamined assumptions.
AI Pair-Programmer Prompt
text
Run a production-readiness review using this reference. For every claim request a
link to a test, trace, evaluation, scan, migration rehearsal, restore drill, canary,
or runbook. Classify gaps as launch blocker, time-bound risk, or improvement; name
owner and verification. Prefer removing unjustified components over adding tools.
Final exercise
Choose one capstone and conduct a release review with another person. Neither reviewer may accept “it should,” “the framework handles it,” or “the AI understands” as evidence.
Acceptance criteria: every launch claim has reproducible evidence, every accepted risk has an owner and date, and the final architecture contains no component whose purpose or outage behavior is unknown.
Knowledge check
What is the default durable database in this book?
When is Redis justified?
When should an agent replace a workflow?
What makes a production claim credible?
Answers
PostgreSQL.
When a measured shared low-latency/ephemeral need, bounded design, and outage policy justify it.
Only when adaptive planning produces measured value beyond a workflow while safety and budgets remain bounded.
Reproducible evidence such as tests, traces, evaluations, scans, migrations, restores, canaries, and drills.
Completion checklist
I can justify every component and remove unjustified ones.
I can produce evidence for launch claims.
I can recover the system and explain its tradeoffs.