Level 4 · Master Production¶
Goal: operate Node services with confidence. The first three levels taught you to build a correct service; this level is about everything that happens after it ships — finding why it's slow, why its memory grows, and why a request hung at 3 a.m.; keeping the codebase changeable as it grows; moving work off the request path; talking to other services without inheriting their failures; packaging and deploying it; seeing inside it in production; and replacing it without dropping a single request.
Several lessons here depend on infrastructure that can't run inside a lesson (container runtimes, Redis, message brokers, tracing backends). Where that's the case, the lesson says clearly what was run while writing it and what wasn't, and gives you a local alternative wherever one exists — a Postgres-backed job queue, an in-process Postgres for tests, a console trace exporter.
Modules¶
- Performance Profiling & Memory Leaks — CPU profiles, flame graphs, heap snapshots, and a leak found and measured
- Diagnostics in Production — diagnostic reports, AsyncLocalStorage, diagnostics_channel, and trace flags
- TypeScript for Node — native type stripping,
tscas a checker, and typed Express with Zod - Architecture: Layered & Hexagonal — use cases, ports and adapters, and dependency injection with plain functions
- Queues & Background Jobs — a runnable
SKIP LOCKEDqueue, BullMQ, retries, and idempotent jobs - Microservices Communication — timeouts, retries with jitter, circuit breakers, gRPC, and events
- Containerizing & Deploying — multi-stage Dockerfiles, PID 1 and signals, health checks, and CI
- Observability with OpenTelemetry — traces across services, RED metrics, and correlating signals
- Graceful Shutdown & Reliability — draining on SIGTERM, timeouts everywhere, crash-only design
- Capstone — A Production-Ready Service — a bookings service built to a production bar, with a review rubric
What you need before starting¶
- Levels 1–3. The capstone assumes every earlier technique.
- Chrome (or another Chromium browser) for DevTools profiling and heap snapshots.
- Optional but recommended: Docker (or Podman) for lessons 07–08 and the capstone.
When you finish this level, you have the skills expected of an engineer who owns Node services in production — and a capstone repository to prove it.