Backend
backend
Community
Kubernetes Pod Scheduling Mental Model Drill
A 4-question reference set on how Kubernetes places pods: filter-then-score, requests vs limits, affinity and anti-affinity, and the taint/toleration machinery the kubelet uses to signal node health.
N+1 Queries: Detection and Prevention
What an N+1 query is, why ORMs hide them, the four ways to fix them, and the simple logging change that has caught every N+1 I have shipped since I added it.
Tradeoff Stories and the Design They Led To
A 5-question set where each behavioral tradeoff story is paired with the design choice it forced. Drawn from a senior backend loop where the interviewer kept pushing past the story into the code that proved it.
Backend Loop Questions That Actually Test System Design
Five backend coding questions where the surface is a function but the real signal is your system-design instincts. None of them want the cleverest algorithm; all of them want the right data model and the right failure mode.
Database Migrations: A Zero-Downtime Playbook
Adding a column, renaming a column, dropping a column, splitting a table. The expand-contract pattern, the four-step rename, and the migration phases that have kept me from taking the site down.
Infrastructure as Code: Terraform vs Pulumi vs CDK
Three IaC tools I have shipped to production, the trade-offs that actually matter (state, language, drift, blast radius), and the picks I would make today by team shape.
Pagination Strategies: Offset, Cursor, and Keyset
Offset is the default that breaks under load. Keyset is what you want for most lists. Cursor is keyset wearing a public costume. Pick deliberately, not by ORM defaults.
Docker for Devs Who Don't Want to Be Sysadmins
The 80% of Docker that I actually use day to day, the layer-cache rules that cut my image builds from 4 minutes to 30 seconds, and the four mistakes that haunted my first year.
Microservices vs Monolith: An Honest Comparison
Modular monolith is the right default for most teams. Microservices earn their cost only past a specific organizational scale, and the bar is higher than the literature suggests.
The Stripe Loop Questions I Actually Got
A 5-question reconstruction of a senior backend loop at a payments company in 2024. Each one is paired with what the interviewer pushed back on and what I should have answered.
JWT vs Sessions and When Stateless Bites Back
Sessions are the right default for first-party web apps. JWTs make sense at federation boundaries. Stateless is a property of where state lives, not whether it exists.
Error Handling in REST APIs: The Shape I Settled On
RFC 7807 plus a code, requestId, errors array, and documentationUrl. The eight fields earning their keep, the status codes everyone confuses, and what changed my mind across four APIs.
Feature Flags: Three Patterns I Keep Reusing
The release flag, the kill switch, and the experiment flag. Different lifetimes, different rollback rules, and the cleanup discipline that has stopped my flag system from becoming a graveyard.
Connection Pooling, PgBouncer, and the Prisma Trap
What a connection pool actually does, why your Postgres falls over at 200 connections, where PgBouncer sits, and the prepared-statement bug that bites every Prisma team that adds it the wrong way.
LLM Fundamentals: Tokens, Context, and Cost
Tokens are not characters or words. Context is not free. Cost is per-token in both directions. The three fundamentals that determine 80% of how an LLM-backed feature performs and bills.
AWS Lambda Cold Starts: What Actually Helps
Where the cold-start time really comes from, the four levers that have moved my p99 down by hundreds of milliseconds, and the optimizations I have tried and abandoned because they did not pay back.
Embeddings and Vector Search, Explained for Devs
What an embedding actually is, why cosine similarity is the metric you reach for, and the production decisions (chunking, hybrid search, dimension count) that determine whether a vector search ships or sits.
API Versioning Strategies Without the Pain
Pick a versioning strategy on the day you ship the first version. URI versioning is the safe default, calendar dating is the gold standard, and your first release IS a contract.
