Failure Is a Better Architect Than Success

The most reliable systems you have ever used were not designed that way. Someone got paged at 2am, spent three hours confused, and then added the metric that should have existed from the start.

I used to think reliability was mostly a design problem. If you thought carefully enough upfront, modeled the failure cases, wrote good tests, the system would hold. That belief survived until the first time I watched a queue silently back up for six hours because a Lambda function was retrying on a 429 and nobody had a metric on retry count. The monitoring dashboard showed everything green. The system was on fire. That gap, between what your dashboard shows and what is actually happening, is exactly the problem observability exists to close.

Monitoring and Observability Are Not the Same Thing

Monitoring tells you something is wrong. Observability tells you why, including why in ways you did not think to instrument for. A monitor fires when your error rate crosses a threshold. An observable system lets you trace that error back to a specific request, across every service it touched, and see exactly which hop started misbehaving and when. You cannot set an alarm on something you did not know you needed to measure. Observability is what makes those unknown unknowns visible after the first incident surfaces them.

What CloudWatch Is Actually For

Amazon CloudWatch is where most of this lands practically. It collects metrics, stores logs, fires alarms. The part teams underuse is the alarms, and specifically what they put alarms on. CPU and memory are fine but they are also almost never the thing that causes an actual incident. The CloudWatch alarms worth having are on queue depth, on error rates per endpoint, on the age of the oldest message in an SQS queue. None of those existed on the first service I worked on that had a serious incident. All of them existed after. That is honestly the most common origin story for a good alarm: something broke, the metric that would have caught it did not exist, someone added it before closing the ticket.

What X-Ray Shows You That Code Review Misses

AWS X-Ray is a different kind of tool. It traces individual requests across service boundaries and shows you a map of every hop, with timing for each one. The first few times I looked at an X-Ray trace I was usually hunting for a specific slow call. What I did not expect was how often I noticed something unrelated while I was in there. A service being called four times per request when once would do. A synchronous database call blocking in a flow that had no reason to be synchronous. These are not bugs exactly. They are design decisions that made sense at the time and look obviously wrong the moment you can actually see them. X-Ray does not just help you debug. It has a way of making architectural mistakes visible that code review usually misses.

Observability Cannot Be Added After the Fact

The thing I wish someone had told me earlier is that observability cannot really be added after the fact. You can try, but by the time you are retrofitting structured logs and trace IDs into a system that was never designed for it, you are touching almost everything. Teams that do this well treat instrumentation the way they treat error handling: not as a polish step at the end, but as part of what building the thing actually means.

A log line with no request ID attached is nearly useless once you have more than two services. A metric on memory with no metric on processing latency tells you the machine is alive but not whether the work is moving. These feel like small decisions until they are not.

The Scars Are the Architecture

Production will always find the scenario your staging environment missed. I have stopped being surprised by that. Every team eventually ships something that works fine in testing and immediately surfaces an edge case under real traffic. The question is not whether that happens. It is how long you spend confused when it does.

The services that handle real load without falling over are not the ones where engineers predicted every failure mode correctly. They are the ones where engineers could see clearly enough to learn from the failures they did not predict, and cared enough to close those gaps before the next incident. The scars are the architecture. That is not a comforting idea when you are in the middle of an incident, but it is an accurate one.

Comments

Popular posts from this blog