OverviewsInfrastructure
Infrastructure, the things worth tracking
Contents
- Infrastructure as code, and the state file
- Replace servers instead of repairing them
- Pick the compute model by what you want to stop managing
- Follow one request from DNS to the database
- Failure domains and static stability
- Recovery point and recovery time
- Timeouts, retries and overload
- Capacity and autoscaling
- Observability: metrics, logs and traces
- SLOs and error budgets
- Deploys and release strategy
- Cost as an engineering metric
- Rehearse failure on purpose
- Where the other overviews pick up
- Sources
If you are going deep on infrastructure, most of the field comes down to three questions. What exists, and does it match what you think exists? What happens when part of it fails? What does it cost to run and to change?
This page covers the 13 things I watch to answer those questions, each with the numbers I’d track. The prompting guide turns the same ideas into prompt lines. I’ve left out containers and Kubernetes, databases and security, because each has its own overview, so they come up here only where they touch the rest.
Infrastructure as code, and the state file
Infrastructure as code means every network, server, DNS record and bucket is defined in versioned files and created by a tool such as Terraform. Nobody clicks in a console. You get review, history and the ability to rebuild an environment from scratch.
The part people underestimate is state. Terraform keeps a state file that maps each resource in your code to the real object’s ID. The plan step compares three things: your code, the state file and what the provider reports. If two people apply at once without a lock, they can corrupt the state. If someone edits a resource by hand, the code and reality drift apart, and the next plan wants to undo their change.
What I track:
- Where state lives and who can read it. Terraform’s own docs warn that state can expose secrets, so it belongs in a remote backend with encryption and tight access.
- Locking. Every backend that writes state should lock it, and CI should fail rather than skip the lock.
- Drift. A scheduled
terraform plan -refresh-onlytells you when reality no longer matches the code. - Plans that replace or destroy. The most expensive outages I’ve seen started as an apply nobody read.
Why it matters: the state file is the tool’s memory. When it is wrong, lost or out of date, the tool makes confident changes to the wrong things.
The first section of the prompting guide has the terms and prompt lines.
Replace servers instead of repairing them
A server that people patch by hand turns into what Martin Fowler called a snowflake server. It works, nobody remembers why, and nobody can build a second one. Kief Morris described the alternative in 2013 as the immutable server: once deployed it is never modified, only replaced by a new instance built from an updated image.
In practice this means a pipeline that bakes a machine image, or a container image, from a pinned base, tags it with the commit, and rolls it out the same way as a code change. Configuration management tools such as Ansible still have a place for hosts you can’t replace often, but the goal is the same. Running the tool a second time should change nothing.
What I track:
- Age of the oldest running instance. Fowler’s phoenix server idea is to rebuild on a schedule so rebuilding never becomes rare and scary.
- Base image patch lag. How many days since the base image last picked up security updates.
- Manual changes. Any SSH session that changes a production host is a future snowflake.
Why it matters: when every server comes from a known image, a bad server is replaced in minutes and the fix for a vulnerability is one rebuild.
Pick the compute model by what you want to stop managing
NIST’s 2011 definition of cloud computing still frames this well. Infrastructure as a service gives you machines and you run the operating system. Platform as a service runs your app and you manage less. The newer options keep moving that line.
- Virtual machines. You own the OS, patching and boot time. You also get full control.
- Containers. You own the image and its contents. A scheduler places them. The containers and Kubernetes overview covers this layer.
- Functions. AWS Lambda runs your code per event. A new execution environment pays a cold start, which AWS says happens in under 1% of invocations and takes from under 100 ms to over a second. Its init phase is capped at 10 seconds unless you use provisioned concurrency or SnapStart.
- Edge isolates. Cloudflare Workers run code in V8 isolates in each data center. Cloudflare says an isolate starts about a hundred times faster than a Node process in a container, but isolates are short-lived, so no state may live in global memory.
What I track: cold start rate and duration for functions, idle capacity for VMs and containers, and how much of the team’s time goes to patching the layer we chose to own.
Why it matters: the compute model decides your scaling speed, your floor cost at zero traffic and your patching work. Changing it later means rewriting deploys and often the app.
Follow one request from DNS to the database
When something is slow or broken, I trace one request end to end. Every hop has its own cache, timeout and failure mode, and most outages live at one of these boundaries.
The things I check at each hop:
- DNS. The TTL decides how long resolvers keep an old answer, so a migration starts by lowering it at least one old TTL ahead. RFC 2308 also makes resolvers cache “this name does not exist”, for the lower of the SOA minimum and the SOA record’s own TTL. A lookup before a record exists can keep failing after you create it.
- Anycast. Providers such as Cloudflare announce one IP address from many locations and the network routes users to the nearest one. That also spreads attack traffic across locations.
- The CDN. Cache hit ratio, the cache key and the Cache-Control headers decide how much reaches your origin. RFC 5861’s stale-if-error lets a cache keep serving a stale page when the origin returns 500 to 504.
- TLS. Where it terminates, which versions you accept, and how certificates renew. The CA/Browser Forum voted in 2025 to cut maximum certificate life from 398 days to 47 days in steps between March 2026 and March 2029, so manual renewal is on its way out. TLS 1.3 also got a new RFC, 9846, in July 2026, which obsoletes RFC 8446 and keeps the same version number.
- The load balancer. Health check interval and thresholds, connection draining during deploys, and whether the health check tests only the process or also its dependencies. A deep check against a shared database can mark every instance unhealthy at once.
Why it matters: most “the site is down” reports turn out to be one of these hops behaving exactly as configured. Knowing the TTLs, timeouts and health check rules lets you predict the failure instead of discovering it.
Sections 4, 5 and 6 of the guide cover these hops.
Failure domains and static stability
A failure domain is anything that fails together: a host, a rack, an availability zone, a region, a shared dependency. High availability means knowing which of those you must survive and having the capacity in place before it fails.
AWS’s Builders’ Library calls this static stability: the system keeps working when a dependency is impaired, without having to make changes. Their example runs in three zones and overprovisions by 50%, so each zone normally runs at about 66% of its tested capacity. Lose one zone and the other two absorb the load with nothing new to launch.
The opposite is what AWS calls bimodal behavior: a system that acts one way normally and another way in failure, for example a failover plan that depends on launching instances. Launching instances uses the control plane, the machinery that creates and changes resources. During a regional event the control plane is often the thing under the most strain. The data plane, which serves traffic, should keep working on its own.
Two patterns go further. Cell-based architecture runs many isolated copies of the stack, each with its own data, behind a thin router, so a bad deploy or a poison request takes out one cell. AWS’s example of 10 cells leaves 90% of requests unaffected when one fails. Shuffle sharding gives each customer a random pair of workers out of a pool. With 8 workers there are 28 pairs, so one bad customer affects about 1 in 28 others instead of a quarter of them.
What I track: utilization per zone against the N+1 limit, every step of the failover path that calls a control plane API, and the share of customers each cell or shard holds.
Why it matters: redundancy you have to create during the outage is not redundancy. The numbers have to work before the failure.
Recovery point and recovery time
Disaster recovery comes down to two numbers from the business. The recovery point objective is how much data, measured in time, you may lose. The recovery time objective is how long you may be down.
AWS’s disaster recovery whitepaper lists four strategies in rising cost. Backup and restore rebuilds everything from backups and code. Pilot light keeps data replicated in a second region with the app switched off. Warm standby runs a smaller copy that can take traffic at once. Multi-site active/active serves live traffic from more than one region.
What I track: replication lag and backup age against the RPO, and the measured time of the last full restore against the RTO. A restore that has never been run has an unknown RTO.
Why it matters: these two numbers set most of the infrastructure budget. Agreeing on them up front stops the team from building active/active for a service that could be down for a day, or nightly backups for one that can’t lose an hour.
Timeouts, retries and overload
Retries are the most common way I’ve seen a small failure turn into a large one. A retry spends more of the server’s time for a better chance of success, which is fine for one client and harmful when every client does it during an overload.
The Builders’ Library article on retries and the Google SRE book chapters on overload agree on most of the fixes:
- Set timeouts from data. AWS picks an acceptable false-timeout rate, such as 0.1%, and uses the dependency’s matching latency percentile, p99.9.
- Retry at one layer. Inner services fail fast and the outermost caller retries.
- Back off with jitter. Exponential delays with randomness stop clients retrying in sync.
- Cap retries. Google’s per-client example retries only while retries are under 10% of requests.
- Pass deadlines down. Each hop forwards the time left, so no service keeps working on a request whose caller has given up.
- Shed load early. Return 503 before doing work once in-flight requests pass a limit, and serve a degraded answer where one exists.
- Make writes idempotent. A retry of a payment must not charge twice, so the server needs an idempotency key.
What I track: retry rate as a share of requests, timeout counts per dependency, queue length and time spent queued, and how many requests are shed under load.
Why it matters: these settings decide whether a slow database causes slow pages or a full outage that only ends when traffic stops.
Capacity and autoscaling
Autoscaling is a control loop with a delay. Target tracking, which AWS recommends over the older policy types, holds a metric such as CPU or requests per target near a value you choose, and it scales in more slowly than it scales out. A new instance only helps after its warmup period, so the headroom you keep has to cover boot time plus app start.
Little’s Law is the arithmetic I use for sizing. Requests in flight equal arrival rate times time in the system. At 400 requests a second and 250 ms each, about 100 requests are in flight, which tells you the worker and connection pool sizes you need. If latency doubles at the same traffic, in-flight work doubles too, which is how a slow dependency exhausts a pool.
Predictive scaling helps with daily patterns. AWS’s version reads up to 14 days of history, forecasts 48 hours ahead, updates every 6 hours, and only scales out from its forecast.
What I track: utilization at peak against the target, time from scale-out decision to a healthy instance, how often the group sits at its maximum, and load test results that show where latency breaks the SLO.
Why it matters: autoscaling that reacts in five minutes does nothing for a spike that peaks in two. You either keep the headroom or you shed load.
Observability: metrics, logs and traces
There are two lenses I use together. For services, the Google SRE book’s four golden signals, which are latency, traffic, errors and saturation, or Tom Wilkie’s RED method, which is rate, errors and duration. For resources such as CPUs, disks and connection pools, Brendan Gregg’s USE method, which is utilization, saturation and errors.
Two habits matter more than any tool. Measure latency as a distribution, not an average. The SRE book’s example is a service averaging 100 ms at 1,000 requests a second where 1% of requests take 5 seconds. Keep metric labels to bounded values, because a label such as user ID creates one time series per user and the metrics bill follows.
Traces connect the rest. OpenTelemetry defines a trace as the path of one request and a span as one unit of work in it. Context propagation passes the trace ID across every hop, usually in the W3C traceparent header, so spans from different services join one trace. Put the same trace ID in every log line and you can go from a slow request to its logs in one step.
What I track: the golden signals per service, USE per resource, the share of requests that carry a trace, and metric cardinality per service.
Why it matters: during an incident the question is always “what changed and where”. Without percentiles and traces you’re guessing from averages.
SLOs and error budgets
A service level objective is a target for a measured indicator over a window, such as 99.9% of requests succeeding in under 300 ms over 30 days. The SRE book’s availability table puts 99.9% at 43.2 minutes of downtime a month and 99.99% at 4.32. The gap between the SLO and perfect is the error budget. Google’s position is that 100% is the wrong target.
The budget does two jobs. It decides when to slow down releases, and it decides when to page. Burn rate is how fast you’re spending it, where 1 means you’d use exactly the whole budget in the window. The SRE workbook’s recommended alerts for a 99.9% SLO page at a burn rate of 14.4 over both 1 hour and 5 minutes, which is 2% of the budget, and at 6 over 6 hours and 30 minutes. Slower burns become tickets. The short window lets the alert clear soon after errors stop.
The SRE book also caps toil, the manual, repetitive work that grows with the service, at 50% of an engineer’s time. I watch that number as closely as any SLO, because a team buried in toil stops improving the system.
What I track: SLI per service against its SLO, remaining error budget, pages per week and how many were actionable, and the share of time spent on toil.
Why it matters: SLOs turn “is it reliable enough” from an argument into a number, and burn-rate alerts page on what users feel instead of on CPU graphs.
Deploys and release strategy
Deploys are the change you make most often, so they cause a large share of incidents. The goal is to make each one small, observable and reversible.
- Build once. One artifact per commit, promoted unchanged from staging to production.
- Canary. The SRE workbook defines it as a partial, time-limited deployment plus an evaluation. Compare the canary with the current version running at the same time, not with yesterday, use no more than about a dozen metrics, and run one canary at a time.
- Blue-green. Fowler’s version keeps two production environments and switches the router. Rollback is switching back.
- Database changes. Both patterns need schema changes that work with old and new code at once, so schema changes ship ahead of the code that needs them. The databases overview goes into this.
- Feature flags. Pete Hodgson’s article separates release toggles, which should live a week or two, from experiment, ops and permission toggles. Old release toggles are debt.
- GitOps. The OpenGitOps principles say desired state is declarative, versioned and immutable, pulled by agents and continuously reconciled. CI then needs no production credentials.
DORA measures delivery with five metrics. Change lead time, deployment frequency and failed deployment recovery time describe throughput. Change fail rate and deployment rework rate describe instability.
What I track: the five DORA metrics, canary failure rate, rollback time, and the number and age of live feature flags.
Why it matters: teams that deploy small changes often, with fast automated rollback, have fewer and shorter incidents than teams that batch changes into big releases.
Cost as an engineering metric
Total spend tells you little on its own, because it should grow with traffic. The FinOps Foundation’s framework puts unit economics in its first phase: cost per request, per active user or per order. A growing bill with a flat unit cost is healthy. A rising unit cost means waste or a design problem.
The FinOps framework splits savings into usage optimization, which is using fewer resources, and rate optimization, which is paying less for what you use through commitments or Spot. Spot capacity is cheap because the provider can take it back. EC2 gives two minutes of warning. Tags that assign every resource to an owner make the rest possible.
What I track: unit cost per service, untagged spend, idle resources such as unattached volumes and old snapshots, data transfer between zones and regions, and commitment coverage of the steady baseline.
Why it matters: cost is the constraint behind most infrastructure choices. A team that can see cost per request can make those trade-offs on purpose.
Rehearse failure on purpose
Everything above is a claim until you test it. The Principles of Chaos Engineering describe experiments that state a steady-state hypothesis, introduce a real-world event such as a lost zone or a slow dependency, and try to disprove the hypothesis, starting with a small blast radius.
What I track: the date and result of the last zone failure test, the last restore drill and the last region failover, and how long detection and recovery took in each.
Why it matters: a failover that has never run is a guess. Game days turn the numbers in this overview into measured ones.
Where the other overviews pick up
- Containers and Kubernetes covers images, scheduling, probes and cluster operations.
- Databases covers replication, consistency, backups and schema changes.
- Security covers identity, secrets, network policy and vulnerability management.
Sources
The sources are the same pages listed at the end of the infrastructure prompting guide. The ones this overview leans on most:
- Monitoring Distributed Systems, Embracing Risk, Availability Table, Eliminating Toil and Handling Overload, Google SRE book
- Alerting on SLOs and Canarying Releases, Google SRE workbook
- Timeouts, retries and backoff with jitter, Static stability using Availability Zones and Workload isolation using shuffle-sharding, Amazon Builders’ Library
- Disaster recovery options in the cloud and What is a cell-based architecture?, AWS
- State and State locking, Terraform
- Immutable Server, Phoenix Server, Snowflake Server, Blue Green Deployment and Feature Toggles, martinfowler.com
- The NIST Definition of Cloud Computing, NIST SP 800-145
- Lambda execution environment lifecycle, AWS, and How Workers works, Cloudflare
- RFC 2308, RFC 5861, RFC 9846 and CA/Browser Forum ballot SC-081v3
- OpenTelemetry traces, The RED Method and The USE Method
- OpenGitOps, DORA metrics, FinOps phases, EC2 Auto Scaling target tracking, predictive scaling, Spot interruption notices and Principles of Chaos Engineering