What Actually Breaks in Production Backends
Every backend works in a demo. The interesting question is what happens on a bad day, with real traffic, when two things arrive at once and one of them times out. These are the lessons I keep relearning, drawn from systems I've actually run.
The demo always passes
Backend work is judged on a demo, which is unfortunate, because a demo exercises the one path where everything succeeds in the expected order. One request at a time, a cooperative network, a payment provider that answers promptly, nobody pressing the button twice.
Production is the opposite of all four. The work that separates a system that holds from one that quietly corrupts itself is almost entirely in the paths a demo never touches, and that work is invisible in a feature list. It's also the first thing dropped from a cheap quote, because nobody can see it missing until months later.
What follows is drawn from backend and infrastructure systems I've led: payments and pricing, real-time delivery, serverless migration, and search. Client work is under NDA, so these are the patterns rather than the products, which is fine, because the patterns are the transferable part.
1. A retry is not a safety net until it's idempotent
The first instinct when a request to an external service fails is to try again. It's correct and it's incomplete, because there is a specific failure that retries make worse: the request succeeded and the response was lost.
From the caller's side that's indistinguishable from an outright failure. You retry. Now the operation has happened twice. In a payment flow that means a customer charged twice, discovered not by your monitoring but by them, in their statement, weeks later.
The fix is to make the operation safe to repeat: attach a key that identifies the attempt rather than the moment, so a duplicate arriving later is recognised and ignored rather than executed again. Then reconcile, because at sufficient volume some fraction of events will still end up in a state neither side agrees on, and you want to find those on a schedule rather than when a customer complains. That combination of retries, idempotency, and reconciliation was the core of the pricing and payment integration I built, and it is almost exactly the part of the work that doesn't show up in a demo.
If you only take one thing from this article: ask anyone quoting on a payment integration how they handle a request that succeeded but didn't reply. The answer tells you whether they've run one in production.
2. Correctness under concurrency is most of the job
Single-user logic is easy to reason about and easy to test. Almost nothing in a real system runs single-user.
Two pricing changes land seconds apart. A transaction reads a tier while an administrator is editing it. Someone submits a form twice because the first attempt felt slow. Each is ordinary, and each is a chance for the system to end up in a state no single code path intended.
The genuinely hard part isn't preventing this. It's preventing it without making everything slow. You can serialise everything and be correct and unusable, and the checkout path is exactly where that trade-off is least acceptable: it's the one request where latency costs you money directly. Getting both means being deliberate about where consistency is enforced and keeping that enforcement off the hot path, which is a design decision made early or not at all.
This is the clearest line between a website and a web application. A site presents content, and concurrent readers don't interfere. An application holds state that several people act on at once, and the correctness of that state is the product.
3. Polling is a decision you make by accident
Asking the server every few seconds whether anything has changed is the path of least resistance. It's easy to write, it works immediately, and it's usually chosen without anyone deciding to choose it.
The costs arrive later and compound. Nearly every one of those requests answers "nothing new," so you're paying for load that does no work, and that load scales with users multiplied by frequency rather than with actual activity. Meanwhile the experience is still wrong: the interface is stale for up to the length of the interval, and shortening the interval to fix that multiplies the waste.
Pushing updates from the server when something actually changes inverts both problems. The honest caveat is that it moves the difficulty rather than removing it. With a persistent connection the hard part becomes lifecycle: connections drop on mobile networks, clients sleep and wake, reconnections need to recover whatever was missed. That's the real engineering, and it's why replacing polling with WebSockets is more work than it first looks. Worth doing, but not because the happy path is simpler.
4. You can't cut over. You have to run both.
The most dangerous sentence in a migration plan is "then we switch." Every nontrivial migration I've run has gone the other way: build the new path, run it alongside the old one under real traffic, compare the results, and only then move.
The reason is that the old system's behaviour is not fully documented anywhere, including in its own code. It has accumulated edge cases, implicit assumptions, and quiet workarounds that nobody remembers adding. Running the paths in parallel is how you discover those, because the discrepancies show you precisely where your understanding was wrong, on real inputs, while the old path is still serving customers.
It feels slower and it costs less. On the AWS and CI/CD work, moving live services to serverless without downtime meant exactly this: incremental rollout, close monitoring, and cutting over only once the new path matched the old one's behaviour under real load. The measured outcomes there were a 90% reduction in deployment effort from replacing manual deploys with full CI/CD automation, and 60% faster API response times from the serverless migration and database work. Those are the only two numbers I quote anywhere, because they're the two I can stand behind.
5. Every manual step is an incident waiting for a bad day
Manual processes don't look like risk. They look like flexibility, and they're usually defended on the grounds that the team is careful.
The trouble is that manual steps fail in correlated ways. They fail when someone is rushing, when the person who knows the procedure is away, when it's late and it's the fourth deploy that day. That's precisely when the stakes are highest.
Two versions of this show up repeatedly. Manual deployment, where consistency depends on someone remembering the order of operations, and manual changes to business-critical configuration with no review step, which is how a pricing change reaches customers without a second pair of eyes ever seeing it. The fix for the first is automation. The fix for the second isn't automation, it's a gate: a maker-checker workflow where one person proposes a change and a different person approves it, strict enough that nothing unreviewed ships, light enough that routine updates aren't painful.
The side effect that gets undersold is the audit trail. Once changes flow through a reviewed process, you can answer what changed, when, and who approved it. Before that, the honest answer is usually that nobody is certain.
6. Adding AI to a backend is mostly a latency and parsing problem
The interesting-sounding part of AI-assisted features is the retrieval. In practice the engineering is dominated by two much more ordinary concerns.
The first is latency. Search is an interactive experience, and a user's patience budget doesn't expand because there's a model in the path. Whatever you add has to fit inside a response time people will tolerate, which constrains the design far more than the choice of model does.
The second is the input. Real documents are inconsistent: varied formats, broken structure, scanned pages, fields that are present three times out of four. The parsing workflow that normalises all of that is where most of the work actually lives, and it's unglamorous enough to be routinely underestimated. That was the shape of the AI-assisted search work, and I'd expect it to be the shape of most AI features bolted onto an existing system.
What this means if you're commissioning backend work
You can't evaluate any of this directly, and you don't need to. You can listen for whether it's priced in:
- Do they raise failure cases unprompted? Timeouts, duplicates, partial failures. Someone who brings these up before you do has operated a system, not just built one.
- Do they ask what happens when two people act at once? If concurrency never comes up in scoping an application, it won't be handled in the build.
- Is there a migration plan, or a switch date? A plan that runs old and new in parallel is more expensive and far more likely to work.
- What's manual after handover, and who does it? Every manual step is a future incident and should be a deliberate choice, not an oversight.
- Can they tell you what was hard on something comparable? This is the same test I described in how to choose a developer, and it remains the most reliable one available to a non-technical client.
None of this requires you to understand the implementation. It only requires noticing whether the difficult parts are being discussed at all.
The short version
Retries without idempotency create duplicates rather than resilience. Concurrency is where correctness is won or lost, and it has to be handled without slowing the path that matters. Polling is a default, not a decision. Migrations run in parallel before they cut over. Manual steps fail exactly when you can least afford it. And AI features are mostly latency and parsing.
All of it is invisible in a demo and expensive to retrofit, which is why it belongs in the scope rather than in a later conversation about why something went wrong. If you want that done properly, it's what backend and API work is for.
Building something that has to stay correct under real traffic? Tell me what it does and where you think the risk is, and I'll tell you what I'd worry about and what I'd do about it.