backend
Backend Architecture
How a server handles a request from start to finish — and how to make it reliable: background work, safe retries, and clean shutdowns.
Start track →Start from zero
Before the senior material: what a backend even is, and the handful of words the rest of the track assumes you already know.Request lifecycle
How a single HTTP request travels through reverse proxy, middleware stack, handler, and response pipeline — and where latency hides at each hop.Middleware and dependency injection
Middleware chains intercept cross-cutting concerns; DI containers wire services at startup — together they determine what runs, in what order, and with what cost.Async vs blocking I/O
Blocking I/O pins a thread per connection; async/non-blocking uses an event loop to multiplex thousands of concurrent operations on a handful of threads.Connection and thread pooling
Pools amortise expensive resource creation across many requests — the pool size, wait timeout, and eviction policy determine whether you get throughput or cascading timeouts.Idempotency and retries: turning at-least-once into effectively-once
Idempotency keys, server-side dedupe, exponential backoff with jitter, thundering herd, and how the outbox + inbox patterns close the dual-write gap.Circuit breakers and bulkheads
Circuit breakers stop cascading failures by fast-failing calls to a degraded dependency; bulkheads isolate failure domains so one slow service cannot exhaust the entire thread/connection budget.Graceful shutdown and drain
A graceful shutdown stops accepting new work, drains in-flight requests, closes connections in the right order, and signals readiness to the orchestrator — doing it wrong causes request loss during every deploy.Putting it together: production backend
Lifecycle, middleware, async I/O, pools, idempotency, circuit breakers, and graceful shutdown compose into a production backend that handles partial failure without data loss or cascading outages.Build with this track
Guided projects that exercise what you learn here.
At-least-once job queue
Build a durable job queue on Postgres with visibility timeouts and idempotent consumers, so a crashed worker never drops a job.
Bloom filter
Build a space-efficient probabilistic set that answers membership queries in O(1) with a tunable false-positive rate — and understand exactly why it can never produce false negatives.
Circuit breaker
Build a circuit breaker that stops hammering a failing dependency, probes it safely with a half-open state, and resets automatically — the exact pattern that keeps microservice cascades from turning one bad node into a full outage.
Consistent hashing ring
Build a virtual-node hash ring that remaps only the minimum set of keys when a node joins or leaves — the foundational primitive behind Dynamo, Cassandra, and every sharded cache that must survive node churn without a full reshuffle.
Feature-flag service
Build a small flag service with targeting rules, percentage rollouts, and a typed SDK that evaluates flags client-side from a cached ruleset.
A concurrent Go ingest service
Build a concurrent ingest/fan-out worker in Go — then operate it: bound the work, apply backpressure, make downstream calls survive failure, ship it in a minimal container, and work a goroutine-leak incident before it eats your memory.
Grounded RAG Service
A RAG demo that answers from a corpus is easy; a RAG service you'd trust in front of users is not. The hard part isn't retrieval, it's grounding: making the model say only what the retrieved text supports, attaching citations the reader can check, and proving with an eval set that the answers don't drift into confident fiction. You'll build the whole loop — chunk, embed, store, retrieve top-k, ground, cite, score — and feel exactly where it leaks.
Idempotent ETL Pipeline
Pipelines don't fail gracefully — they fail at 3 a.m., halfway through a load, and someone re-runs them. This project teaches the one property that separates a hobby script from production data engineering: a run you can repeat any number of times and still land exactly one copy of each row. You'll build batch ingestion, an idempotent load, a watermark for incremental pulls, and the data-quality gates that stop bad data before it poisons everything downstream.
Job scheduler
A cron + backoff job runner with at-least-once delivery, idempotent handlers, and visibility timeouts — so no job is silently lost even when workers crash mid-execution.
LRU cache
Build a Least-Recently-Used cache that evicts in O(1) by combining a hashmap and a doubly-linked list — the canonical interview problem that teaches you exactly why cache eviction is harder than it looks.
Mini CRUD API
Build your first real backend: a tiny HTTP API that creates, reads, updates, and deletes notes — backed by SQLite so the data survives a restart. You go from a one-line 'hello' server to a small service that validates input and stores rows, one honest step at a time.
Production-Shaped Nest Service
NestJS rewards you for structure and punishes you for skipping it. Build a service the way a team would ship it: feature modules with real boundaries, DTOs that validate at the edge, guards and interceptors that own cross-cutting concerns, a typed config you can't typo, and an e2e suite that boots the whole app. This is the difference between knowing Nest's decorators and knowing why they exist.
Mini OAuth 2.0 + PKCE login
Implement the authorization-code + PKCE flow end to end against a real provider, so you understand every redirect and token instead of trusting a library.
Presigned upload flow
Direct-to-storage uploads via presigned URLs with size/content-type limits and a completion webhook that verifies the object actually arrived — so your API server never touches file bytes.
Async Python service, built and operated
Build an async FastAPI ingestion service that validates, pipelines, and survives load — then run it: package it, containerize it with correct PID-1 behaviour, and work the incident when a swallowed CancelledError quietly leaks tasks until the event loop starves.
Distributed rate limiter
Build a token-bucket limiter that holds across many app instances by keeping the counter in Redis, not in process memory.
Type-Safe API SDK
Build the client other engineers will actually trust: a typed SDK over a real HTTP API where the compiler — not a runtime crash in production — catches the wrong field, the missing variant, the response that lied about its shape. You model the domain with discriminated unions and generics, validate every response at the boundary, and let inference carry exact types all the way to the call site, with zero `any` left to paper over the gaps.
URL shortener at scale
Build a URL shortener that survives real traffic — then run it: deploy it, watch it, and work the incident when one hot link melts your cache.
Crash-safe key-value store with a WAL
Build a tiny on-disk KV store that survives a kill -9 mid-write by appending to a write-ahead log before touching the main file.
APIs
How programs talk to each other over the network — the main styles (REST, GraphQL, gRPC), and how to design one that stays usable as it changes.