Backend
The practitioner concerns of writing the service behind the API, scoped to avoid the ground already taught in system-design, api-design, software-architect, and computer-science. Thirty-one lessons.
What Does a Backend Developer Do?What a backend service is actually responsible for, and where that responsibility stops and the frontend's or infrastructure's begins.Choosing a Backend Language and RuntimeHow Node.js, Python, Go, Java, Ruby, PHP, .NET, and Rust actually trade off for backend work, and why the "best" one depends on what you're building.Web Frameworks and the Request-Response CycleWhat actually happens inside a web framework between an HTTP request arriving and a response going out — routing, middleware, controllers, and MVC.The Twelve-Factor App and Environment ConfigWhy config lives in environment variables, not code, and the twelve-factor discipline that makes a service portable across dev, staging, and prod.Web Servers, Application Servers, and Reverse ProxiesWhy your framework's own server never faces the internet directly, and what Nginx or Apache is actually doing in front of it.Containerizing a Backend ServiceWhy you package a backend service as a container image — the problem it solves and how a Dockerfile fits with twelve-factor config.Relational vs. NoSQL Databases in PracticeHow a working backend developer actually decides between a relational database and a document, key-value, or wide-column store for a given app.ORMs, Query Builders, and Raw SQLWhat an ORM actually buys and costs you, where a query builder fits between it and raw SQL, and when to just write the SQL yourself.Schema Migrations and Change ManagementWhy schema changes need to be versioned, repeatable code, and how the expand-contract pattern lets you deploy and migrate independently.Transactions and Isolation Levels in Application CodeWhere to actually put BEGIN/COMMIT/ROLLBACK in your code, what isolation levels prevent, and the deadlock-and-retry reality of using them.The N+1 Query Problem and Eager LoadingThe classic ORM bug where a loop issues one query per item instead of one batched query — how to detect it and how to fix it.Time, Timezones, and Locale-Aware DataWhy you store timestamps in UTC and convert at the edge, the DST bugs that hit when you don't, and storing a user's timezone instead of assuming the server's.Caching in Application CodeThe cache-aside pattern as you actually write it in a request handler, and why invalidation is the hard part, not the lookup.Password Hashing and Credential StorageWhy passwords are never stored as plaintext, why fast hashes like SHA-256 are the wrong tool, and why bcrypt/scrypt/argon2 exist.Input Validation and Injection AttacksWhy parameterized queries stop SQL injection, and the broader discipline of validating input and encoding output before it reaches another interpreter.Secrets and Sensitive Data HandlingThe day-to-day discipline of keeping secrets out of version control and out of logs, as an app developer rather than an infrastructure team.Sessions and Cookies in PracticeThe Set-Cookie flags that actually protect a login session, and where server-side session data should live once you have more than one server.Rate Limiting Implementation in Your AppHow to actually bolt rate limiting onto a real service — the counting middleware, the 429 response, and in-process versus Redis-backed counters.Background Jobs, Task Queues, and SchedulingWhy slow or unreliable work gets moved out of the request cycle, and how job queues, retries, and idempotent design make that safe.Search Engines and Full-Text SearchWhy LIKE queries don't scale for text search, how an inverted index fixes that, and when to reach for a dedicated search engine instead.File Uploads and Object StorageWhy uploaded files belong in object storage, not your database, and how presigned URLs keep bytes off your own server.Sending Transactional EmailWhy password resets and receipts need a transactional email service, not your own SMTP server, and what SPF, DKIM, and DMARC actually fix.Receiving and Verifying WebhooksHow to verify a webhook's HMAC signature, respond fast, and process the sender's retries without double-charging or double-emailing anyone.Calling External APIs ReliablyWhy every outbound HTTP call needs a timeout, how to retry transient failures with backoff and jitter, and when not to retry at all.Feature Flags in PracticeWhy feature flags exist, how they decouple deploying code from releasing it, and what separates an env var flag from a real targeting service.Idempotency Keys in PracticeHow a client-generated idempotency key, a dedup table, and one transaction make an unsafe retry like "charge this card" safe.Real-Time Features: WebSockets, SSE, and Long Polling in PracticeChoosing between WebSockets, server-sent events, and long polling, and the real problem of fanning out messages once you run more than one server.Health Checks and Graceful ShutdownWriting liveness and readiness endpoints and a SIGTERM handler that drains in-flight requests before your own process exits.Structured Logging and Correlation IDsWhat to put in a log line, when to use each log level, and how a correlation ID lets you reconstruct one request across an entire call chain.Metrics and Instrumentation in Application CodeWhat counters, gauges, and histograms actually measure, and how adding them to your own code is what makes a service's performance measurable.Testing Backend Services with Real DependenciesTest databases, fixtures, resetting state between tests, ephemeral containers versus mocking, and stubbing external HTTP dependencies.
The backend developer's job
- What Does a Backend Developer Do?What a backend service is actually responsible for, and where that responsibility stops and the frontend's or infrastructure's begins.
- Choosing a Backend Language and RuntimeHow Node.js, Python, Go, Java, Ruby, PHP, .NET, and Rust actually trade off for backend work, and why the "best" one depends on what you're building.
- Web Frameworks and the Request-Response CycleWhat actually happens inside a web framework between an HTTP request arriving and a response going out — routing, middleware, controllers, and MVC.
- The Twelve-Factor App and Environment ConfigWhy config lives in environment variables, not code, and the twelve-factor discipline that makes a service portable across dev, staging, and prod.
- Web Servers, Application Servers, and Reverse ProxiesWhy your framework's own server never faces the internet directly, and what Nginx or Apache is actually doing in front of it.
- Containerizing a Backend ServiceWhy you package a backend service as a container image — the problem it solves and how a Dockerfile fits with twelve-factor config.
Working with databases in code
- Relational vs. NoSQL Databases in PracticeHow a working backend developer actually decides between a relational database and a document, key-value, or wide-column store for a given app.
- ORMs, Query Builders, and Raw SQLWhat an ORM actually buys and costs you, where a query builder fits between it and raw SQL, and when to just write the SQL yourself.
- Schema Migrations and Change ManagementWhy schema changes need to be versioned, repeatable code, and how the expand-contract pattern lets you deploy and migrate independently.
- Transactions and Isolation Levels in Application CodeWhere to actually put BEGIN/COMMIT/ROLLBACK in your code, what isolation levels prevent, and the deadlock-and-retry reality of using them.
- The N+1 Query Problem and Eager LoadingThe classic ORM bug where a loop issues one query per item instead of one batched query — how to detect it and how to fix it.
- Time, Timezones, and Locale-Aware DataWhy you store timestamps in UTC and convert at the edge, the DST bugs that hit when you don't, and storing a user's timezone instead of assuming the server's.
- Caching in Application CodeThe cache-aside pattern as you actually write it in a request handler, and why invalidation is the hard part, not the lookup.
Security in backend code
- Password Hashing and Credential StorageWhy passwords are never stored as plaintext, why fast hashes like SHA-256 are the wrong tool, and why bcrypt/scrypt/argon2 exist.
- Input Validation and Injection AttacksWhy parameterized queries stop SQL injection, and the broader discipline of validating input and encoding output before it reaches another interpreter.
- Secrets and Sensitive Data HandlingThe day-to-day discipline of keeping secrets out of version control and out of logs, as an app developer rather than an infrastructure team.
- Sessions and Cookies in PracticeThe Set-Cookie flags that actually protect a login session, and where server-side session data should live once you have more than one server.
- Rate Limiting Implementation in Your AppHow to actually bolt rate limiting onto a real service — the counting middleware, the 429 response, and in-process versus Redis-backed counters.
Beyond the request-response cycle
- Background Jobs, Task Queues, and SchedulingWhy slow or unreliable work gets moved out of the request cycle, and how job queues, retries, and idempotent design make that safe.
- Search Engines and Full-Text SearchWhy LIKE queries don't scale for text search, how an inverted index fixes that, and when to reach for a dedicated search engine instead.
- File Uploads and Object StorageWhy uploaded files belong in object storage, not your database, and how presigned URLs keep bytes off your own server.
- Sending Transactional EmailWhy password resets and receipts need a transactional email service, not your own SMTP server, and what SPF, DKIM, and DMARC actually fix.
- Receiving and Verifying WebhooksHow to verify a webhook's HMAC signature, respond fast, and process the sender's retries without double-charging or double-emailing anyone.
- Calling External APIs ReliablyWhy every outbound HTTP call needs a timeout, how to retry transient failures with backoff and jitter, and when not to retry at all.
- Feature Flags in PracticeWhy feature flags exist, how they decouple deploying code from releasing it, and what separates an env var flag from a real targeting service.
- Idempotency Keys in PracticeHow a client-generated idempotency key, a dedup table, and one transaction make an unsafe retry like "charge this card" safe.
- Real-Time Features: WebSockets, SSE, and Long Polling in PracticeChoosing between WebSockets, server-sent events, and long polling, and the real problem of fanning out messages once you run more than one server.
Operating and testing what you built
- Health Checks and Graceful ShutdownWriting liveness and readiness endpoints and a SIGTERM handler that drains in-flight requests before your own process exits.
- Structured Logging and Correlation IDsWhat to put in a log line, when to use each log level, and how a correlation ID lets you reconstruct one request across an entire call chain.
- Metrics and Instrumentation in Application CodeWhat counters, gauges, and histograms actually measure, and how adding them to your own code is what makes a service's performance measurable.
- Testing Backend Services with Real DependenciesTest databases, fixtures, resetting state between tests, ephemeral containers versus mocking, and stubbing external HTTP dependencies.