After It Works

111 entries · infrastructure in plain English

Everything nobody explains after the code works.

You built the thing. It runs. Then it gets slow, or the database falls over, or a script hammers your API at four in the morning and you pay for it. 111 short entries on the infrastructure concepts that decide whether an app survives contact with real traffic. Plain English, no prerequisites, and an honest note on when you do not need the thing.

0 of 111 published · four a week · next: Rate Limiting, 14 Sept 26

1Traffic & the Edge

8 entries · 0 published
1.1Rate LimitingCapping how often one caller can hit your app, so one bad script cannot take it down or run up your bill.14 Sept 26
1.2CachingKeeping the answer you already worked out, so you do not pay to work it out again.15 Sept 26
1.3CDNCopies of your site in a hundred cities, so nobody waits for a round trip to Virginia.15 Oct 26
1.4Load BalancingSpreading traffic over several servers so no one of them is the whole company.19 Oct 26
1.5Reverse ProxiesThe doorman in front of your app that handles TLS, routing and caching before your code sees a thing.20 Oct 26
1.6API GatewaysOne front door for many services, doing auth and rate limiting once instead of in every service.21 Oct 26
1.7Edge CachingCaching the answer at the CDN, not just in your app. The cheapest speed you can buy.22 Oct 26
1.8Cache InvalidationGetting the stale copy to go away at the right moment. Famously one of the two hard problems.26 Oct 26

2Data & Databases

8 entries · 0 published
2.1Database IndexingThe difference between your database reading one row and reading all million of them.16 Sept 26
2.2N+1 QueriesThe most common reason a page that was fast with 10 rows crawls at 10,000.17 Sept 26
2.3Query OptimizationReading the query plan instead of guessing which line made the page slow.27 Oct 26
2.4Connection PoolingReusing database connections, because opening one per request is how serverless apps kill their own database.28 Oct 26
2.5Read ReplicasExtra copies of the database that only answer reads, and the freshness you trade away for them.29 Oct 26
2.6ReplicationKeeping a second copy of your data in sync, which is also how you survive losing the first.2 Nov 26
2.7PartitioningCutting one enormous table into slices the database can skip over.3 Nov 26
2.8ShardingSplitting data across separate databases. Enormously powerful, and almost never what you need.4 Nov 26

3When Things Fail

12 entries · 0 published
3.1TimeoutsDeciding in advance how long you are willing to wait, because "forever" is the default and it is always wrong.22 Sept 26
3.2RetriesTrying again when something fails, and the ways that quietly makes everything worse.23 Sept 26
3.3Exponential BackoffWaiting longer between each retry, so your recovery attempt is not the thing keeping the service down.24 Sept 26
3.4IdempotencyMaking the same request twice do the same thing once. The reason customers do not get charged twice.29 Sept 26
3.5Circuit BreakersGiving up on a dependency that is clearly down, instead of piling on and going down with it.10 Nov 26
3.6Health ChecksThe endpoint that answers "am I actually working?", and why "the process is running" is not an answer.11 Nov 26
3.7Liveness & Readiness ProbesTwo different questions, restart me versus send me traffic, that people constantly answer with one endpoint.12 Nov 26
3.8BackupsA backup you have never restored is not a backup. It is a feeling.16 Nov 26
3.9Disaster RecoveryDeciding, in advance and in writing, how much data and how much time you can afford to lose.17 Nov 26
3.10FailoverAutomatically promoting the spare when the primary dies, and the ways that goes wrong.18 Nov 26
3.11Multi-Region DeploymentsRunning in two places at once. Real insurance, real cost, and a real new class of bug.19 Nov 26
3.12Chaos EngineeringBreaking your own system on purpose, at a time you choose, to find out what breaks when you do not.23 Nov 26

4Queues & Events

7 entries · 0 published
4.1Message QueuesA to-do list between two parts of your app, so slow work does not block a page load.24 Nov 26
4.2Pub/SubOne event, many listeners, none of whom need to know about each other.25 Nov 26
4.3Event-Driven ArchitectureBuilding around "this happened" instead of "do this now", and what it costs you in traceability.26 Nov 26
4.4Dead Letter QueuesWhere the jobs that keep failing go, so you can look at them instead of losing them.30 Nov 26
4.5WebhooksSomebody else’s server calling yours. Verify the signature, answer fast, expect duplicates.1 Dec 26
4.6Cron JobsWork on a timer, and the four ways scheduled jobs quietly stop running.2 Dec 26
4.7BackpressureSaying "slow down" instead of accepting work you cannot finish and falling over.3 Dec 26

5Shipping & Deploys

16 entries · 0 published
5.1CI/CDA robot that builds, checks and ships your code so you never deploy from your laptop at midnight.8 Oct 26
5.2RollbacksGetting yesterday’s working version back in under a minute. The most valuable button you will ever build.12 Oct 26
5.3Database MigrationsChanging the shape of a live database without losing data or taking the site down.5 Nov 26
5.4Schema VersioningKeeping code and database in step when they deploy at different moments.9 Nov 26
5.5DockerShipping your app with its whole environment, so "works on my machine" stops being a sentence.7 Dec 26
5.6KubernetesThe industrial answer to running many containers, and an honest list of who does not need it.8 Dec 26
5.7Feature FlagsTurning a feature on without a deploy, and off without a panic.9 Dec 26
5.8Blue-Green DeploymentsTwo identical environments, one switch, instant rollback.10 Dec 26
5.9Canary ReleasesGiving the new version to 1% of users and watching before you give it to everyone.14 Dec 26
5.10Rolling DeploymentsReplacing servers a few at a time, which means two versions of your code run at once.15 Dec 26
5.11Infrastructure as CodeYour servers described in a file you can review, diff and rebuild from.16 Dec 26
5.12TerraformThe common tool for that file, plus the state file that will eventually confuse you.17 Dec 26
5.13Helm ChartsTemplated Kubernetes config, for when you have the same app in four environments.21 Dec 26
5.14Semantic VersioningWhat the three numbers promise, and why the promise gets broken.22 Dec 26
5.15Dependency HellWhen two of your packages need different versions of a third, and nothing installs.23 Dec 26
5.16Build CachingNot rebuilding what did not change, and the stale-cache bug that costs you an afternoon.24 Dec 26

6Watching Production

9 entries · 0 published
6.1MonitoringKnowing your site is down before your customer tells you.13 Oct 26
6.2LoggingThe notes your app leaves for the person debugging it at 3am. That person is you.14 Oct 26
6.3MetricsNumbers over time. The four that matter more than the hundred your dashboard offers.28 Dec 26
6.4AlertingWaking a human up. Do it for the wrong things and they stop reading the alerts.29 Dec 26
6.5ObservabilityBeing able to answer a question you did not think to ask before the outage.30 Dec 26
6.6Distributed TracingFollowing one request across every service it touched, instead of grepping five log files.31 Dec 26
6.7SLIsThe specific measurement that stands in for "is it working for users?"4 Jan 27
6.8SLOsThe target you promise against that measurement, and why 100% is the wrong target.5 Jan 27
6.9Error BudgetsTreating your allowed failure as a budget you can spend on shipping faster.6 Jan 27

7Security

14 entries · 0 published
7.1Secrets ManagementWhere API keys live so they are not in your repo, your browser bundle, or a screenshot.30 Sept 26
7.2SQL InjectionThe 25-year-old bug that still empties databases, and the one habit that prevents it.1 Oct 26
7.3XSS (Cross-Site Scripting)When user text gets treated as code by somebody else’s browser.6 Oct 26
7.4CORSThe browser rule everyone tries to "just disable", and what it is actually protecting.7 Oct 26
7.5TLSThe padlock. What it actually proves, and what it does not.7 Jan 27
7.6Encryption in TransitProtecting data on the wire, including the internal hops people forget about.11 Jan 27
7.7Encryption at RestProtecting data on the disk, and the honest limits of what that stops.12 Jan 27
7.8OAuth"Sign in with Google", explained in terms of who is trusting whom.13 Jan 27
7.9JWT RotationTokens expire for a reason, and rotating them is where most auth code gets it wrong.14 Jan 27
7.10IAMWho can do what. The permission you granted "temporarily" two years ago is still there.18 Jan 27
7.11CSRFAnother site making your logged-in browser act on your behalf.19 Jan 27
7.12SSRFTricking your server into fetching a URL it should not. The bug behind some very large breaches.20 Jan 27
7.13WAFA filter in front of your app that blocks known-bad requests. Useful, and not a substitute for fixing the bug.21 Jan 27
7.14DDoS ProtectionSurviving traffic that is trying to hurt you, and the surprise bill if you do not.25 Jan 27

8Scale & Speed

10 entries · 0 published
8.1LatencyHow long one thing takes. Not the same as how much you can do.26 Jan 27
8.2ThroughputHow much you can do per second, and why improving it can make latency worse.27 Jan 27
8.3P99 LatencyThe number your average is hiding from you.28 Jan 27
8.4Tail LatencyWhy the slowest 1% of requests hits far more than 1% of your users.1 Feb 27
8.5Horizontal ScalingMore machines. Requires that your app not keep anything important in its own memory.2 Feb 27
8.6Vertical ScalingA bigger machine. Unfashionable, boring, and usually the right first move.3 Feb 27
8.7AutoscalingAdding capacity automatically, and why it is always a little slower than the traffic spike.4 Feb 27
8.8Cold StartsThe first request after idle, and why your serverless app feels slow to exactly one visitor an hour.8 Feb 27
8.9Serverless LimitsThe ceilings nobody mentions until you hit them: time, memory, payload, connections.9 Feb 27
8.10Cost OptimizationWhere cloud bills actually come from, which is rarely the thing you were watching.10 Feb 27

9Distributed Systems

9 entries · 0 published
9.1Eventual ConsistencyThe write went through, and the next read might not see it yet. On purpose.11 Feb 27
9.2CAP TheoremThe trade-off every distributed database makes, minus the whiteboard mysticism.15 Feb 27
9.3Network PartitionsWhen half your system cannot reach the other half and both halves think they are fine.16 Feb 27
9.4Distributed LocksMaking sure only one server does a job, and why this is harder than it looks.17 Feb 27
9.5Leader ElectionPicking one machine to be in charge, and agreeing on it when the network is unreliable.18 Feb 27
9.6Service DiscoveryHow services find each other when addresses change on every deploy.22 Feb 27
9.7Distributed TransactionsMaking two databases agree on one outcome. Mostly, do not.23 Feb 27
9.8Saga PatternWhat you do instead: a sequence of steps, each with an undo.24 Feb 27
9.9Clock SkewTwo servers disagree about the time, and now your "latest" record is the wrong one.25 Feb 27

10Concurrency & Runtime

7 entries · 0 published
10.1Race ConditionsTwo things happening at once that were written assuming they would not.1 Mar 27
10.2Optimistic LockingAssume no conflict, check at save time. The right default for most web apps.2 Mar 27
10.3Pessimistic LockingTake the lock first. Correct, slower, and the road to deadlocks.3 Mar 27
10.4DeadlocksTwo processes each waiting for what the other holds. Nobody moves again.4 Mar 27
10.5Thread SafetyCode that stays correct when two things call it at the same moment.8 Mar 27
10.6Memory LeaksThe slow climb that ends in a restart every Tuesday at 4am.9 Mar 27
10.7Garbage CollectionAutomatic cleanup, and the pause it sometimes takes to do it.10 Mar 27

11Protocols & Realtime

8 entries · 0 published
11.1DNSThe phone book of the internet, and why your change has not taken effect yet.11 Mar 27
11.2WebSocketsA connection that stays open both ways. Powerful, and it changes how you have to deploy.15 Mar 27
11.3Server-Sent EventsOne-way streaming over plain HTTP. Usually the boring right answer.16 Mar 27
11.4Long PollingThe old trick for realtime, and still the most compatible one.17 Mar 27
11.5HTTP/2 & HTTP/3What changed under the hood, and which of your old optimisations are now harmful.18 Mar 27
11.6TCP vs UDPGuaranteed and in order, versus fast and lossy. Why video calls pick the second one.22 Mar 27
11.7gRPCA faster, stricter way for your own services to talk to each other.23 Mar 27
11.8API VersioningChanging an API other people depend on without breaking their Tuesday.24 Mar 27

12The Human Side

3 entries · 0 published
12.1Production IncidentsWhat to actually do in the first ten minutes, in order.25 Mar 27
12.2On-callSomeone has to be reachable. How to make that sustainable for a team of one.29 Mar 27
12.3PostmortemsWriting down what happened so the same outage does not happen twice. Blameless, or nobody tells you the truth.30 Mar 27