Backend Engineering

How do I design, build, scale, secure, debug and operate the backend of a real production system? Not how to create an endpoint — what happens from the moment a request reaches your service until data is returned, persisted, queued, cached, retried, observed and served reliably at scale.

The question this domain answers

How do I design, build, scale, secure, debug and operate the backend of a real production system?

Every lesson here starts from a requirement someone actually asked for, shows the implementation that comes to mind first, and then shows how that implementation behaves at 3 a.m. under load with a dependency degrading. The obvious build is obvious for a reason — it is also where production failures come from.

The reasoning loop every lesson carries
RequirementAPI ContractApplication LogicData AccessExternal DepsConcurrencyFailureSecurityObservabilityDeploymentScale

The order is the argument. What the contract promises decides what must be synchronous; what must be synchronous decides what belongs in a transaction; what is in a transaction decides what can safely be retried. Skip a step and you get a design that is locally reasonable and globally wrong.

This is the integration domain

Backend Engineering does not own the depth. It owns the point where the depth meets a running service that someone is paged for.

Upstream

API Design decides the contract: the resource model, the status codes, the versioning story, what the caller is promised. That is a different question from this one.

Here

This domain builds and runs the service behind that contract — the handler, the transaction, the pool, the queue, the retry, the deploy, the log line you will read during the incident.

Downstream

Databases, Security, Performance, Cloud, OS & Networking and Computer Architecture each own a layer in full. Lessons here teach the application-side mechanism and hand the rest off by name.

Almost nothing here is universal. The same choice is correct on one runtime, at one scale, with one team, and wrong a step away. Every claim carries a scope label saying what it is specific to and where a different stack would differ — that label is the difference between a rule and a rule that happens to hold on your machine.

Flagship experiences

The parts of this domain that are not reading.

Follow the Request →

POST /orders from the client through DNS, TLS, the proxy, the runtime, middleware, the router, authorization, the handler, the transaction, the queue and back. Every hop is a separate participant, and every one of them can fail on its own.

Build a Production API →

A real /checkout endpoint, step by step — with the hard question asked at each step before the answer is given. Where does the transaction end? What if payment times out? What if the commit succeeds and the publish does not?

Scale From 1 to 1M →

Ten rungs, and each one appears only when a problem forces it. Read the problem first: a capability adopted without the problem that justifies it is cost with no benefit.

Break the Backend →

Inject a fault and read the signals. Several different faults raise p99, so p99 diagnoses nothing — the exercise is finding the signal that tells them apart.

Follow One Request to Hardware →

The cross-domain spine: your handler, the driver, the socket, the syscall, the scheduler, the cache hierarchy, the core. You do not need this daily. You need it when the numbers stop making sense.

Decision trees →

Where should this work run, what should it run on, and where does the data belong. Every leaf names what it buys and what it costs.

Why Is My API Slow? →

It was 100 ms and it is now 3 s. Work from the symptom to the cause through deploys, queries, pools, dependencies, the event loop and the queue.

Practice challenges →

Production situations with the cause unlabelled. Each one carries the trap — the wrong fix that looks right and makes the next incident worse.

Interview guide →

What each question is really testing, what a strong answer sounds like, and the red flags that separate a remembered rule from a working model.

Learning modules

Twenty-eight modules, from what a backend actually is once the framework is removed to debugging one at 3 a.m.

200 lessons →
Backend Fundamentals7

What a backend actually is once the framework is removed: the request lifecycle end to end, which responsibilities belong to the server because they cannot be trusted to the client, and why every input from outside the process is untrusted.

HTTP Servers7

What a server does between a socket and a response: accept, parse, build a request object, route, execute, serialize, write bytes. The part frameworks hide most completely.

Backend Runtime Models7

Event loops, threads, workers and processes — the runtime model decides what "slow" means for your service. Taught as concurrency models rather than framework slogans.

Routing & Handlers6

How a method and a path become a function call, how precedence resolves ambiguity, and what a handler should and should not be responsible for.

Middleware6

The pipeline every request passes through, why its order is a correctness decision and not a style one, and how cross-cutting concerns compose without leaking into handlers.

Application Layering7

Service layers, repositories and the transport/application/domain/infrastructure split — including when each is genuine structure and when it is ceremony that adds indirection without behaviour.

Validation & Trust7

Three different validations that are routinely confused: is this well-formed, is this allowed by the business, and is this consistent with what the database already holds.

Serialization & DTOs5

Turning runtime objects into bytes and back, what that costs in CPU and allocation, and why the database row is the wrong thing to hand a client.

Authentication7

Establishing who is calling: credentials, sessions, tokens, OAuth and API keys, from the backend's side of the problem rather than the protocol's.

Authorization8

Deciding what the caller may do — role-based, attribute-based, and the object-level check whose absence is the most common serious backend vulnerability there is.

Database Access9

ORM, query builder or raw SQL as an engineering decision with consequences, plus the query patterns and pool limits that decide how a backend behaves under load.

Transactions7

Which operations belong in one atomic unit, why a network call inside a transaction is a resource problem, and what to do when a commit and a message must both happen.

Caching7

Cache-aside, invalidation, stampedes and the local-versus-distributed decision — including the cases where a cache adds a consistency problem and buys nothing.

Background Jobs & Queues10

Work that does not belong in the request path: deciding what to defer, the queue lifecycle from enqueue to dead-letter, and what happens when producers outrun consumers.

Events6

Commands ask for something to happen; events state that it did. What that distinction changes about coupling, naming, consumers and the consistency of everything downstream.

External Dependencies9

Every call leaving your process can be slow, wrong or absent. Timeouts, retries, backoff, circuit breakers, bulkheads and the rate limits you both enforce and obey.

Webhooks5

Inbound HTTP you do not control: signature verification on the raw payload, duplicate delivery as the normal case, and ordering you cannot assume.

Idempotency6

The property that makes retries safe. Keys, storage, scope and expiry — and the difference between a queue delivering once and your business logic acting once.

Backend Concurrency7

Two requests, one row. Optimistic versioning, pessimistic locks, atomic operations, and the bounded-resource thinking that keeps a burst from becoming an outage.

Errors & Observability9

An error taxonomy that maps causes to responses, boundaries that stop internals leaking, and the logs, metrics and traces that let you answer questions you did not anticipate.

Files & Object Storage6

Uploads that do not go through your process, the bucket/key/object primitive underneath every provider's SDK, and what still has to happen after the bytes land.

Configuration & Testing8

What belongs in code versus runtime configuration, why secrets are a separate problem, and a test strategy chosen by what each layer can actually prove.

Deployment10

Shipping a running service without dropping requests: containers, graceful shutdown, health checks, rolling deploys and migrations that survive two versions at once.

Scaling Patterns7

Statelessness, load balancing, autoscaling signals, pagination, batching and streaming — the specific techniques, and the problem each one is a response to.

Backend Security7

The checklist every service owes: injection, SSRF, dependency risk, secrets discipline and defence in depth, from the implementer's side rather than the attacker's.

Backend Architecture7

Monolith, modular monolith, microservices and event-driven, compared honestly — with the distributed-systems costs that arrive the moment a function call becomes a network call.

Production Debugging8

The API was 100 ms and is now 3 s. Working from symptom to cause through deploys, queries, pools, dependencies, the event loop and the queue.

Agent-Enabled Backends5

A model choosing a tool is a client choosing an endpoint. Authorization, budgets, timeouts and audit still belong to the backend, not to the prompt.

Reference

For when you already know roughly what you are looking for.