← Back to list

The CAP Theorem Decision Nobody Warns You About (Until Your Pager Goes Off)

It’s 2:14 a.m. and the pager doesn’t care that you have a 9 a.m. standup.

Vrinda Goyal · 2026-07-13 03:31 · 0 claps · 3.9 min read paywalled
#design-systems #distributed-systems #backend-engineering #software-architecture #tech-careers-2026
Open on Medium ↗
Wiki topics: PRD · Product Design 🌐 · Web Development 📐 · Mathematics 🏛️ · Architecture

The CAP Theorem Decision Nobody Warns You About (Until Your Pager Goes Off)

It’s 2:14 a.m. and the pager doesn’t care that you have a 9 a.m. standup.

A network partition has split our data center’s east and west regions. Writes to the user-profile service are timing out. In the incident channel, someone types: “just fail over reads to the replica, we’ll figure out consistency later.”

Nobody in that channel realizes they just made a CAP theorem decision. They think they made an operations decision. Those are not the same thing, and the gap between them is where outages get worse instead of better.

Here’s what actually happened, and what it taught me about a concept most engineers can define but very few have actually had to choose.

The incident

Our profile service replicated data across two regions for redundancy. Normal day: writes go to the primary, replicate asynchronously to the secondary, reads can hit either. Fine, until the link between regions degrades and replication lag balloons from milliseconds to minutes.

Now here’s the actual decision hiding inside “just fail over reads to the replica”: do we serve users their profile data even though it might be stale — wrong job title, old profile picture, an email address they changed ten minutes ago — or do we refuse to serve it at all until we’re sure it’s current?

Nobody had explicitly decided this in advance. The system had a default behavior, and during a partition, that default is the decision. We found out what our default was during an incident, in front of customers, instead of in a design review with a whiteboard.

That’s the trap. CAP theorem isn’t really a theoretical constraint you read about — it’s a decision your system is making on your behalf, right now, whether or not you’ve consciously made it.

The concept, taught through what just happened

CAP theorem states that when a network partition occurs, a distributed data system has to choose between two things:

  • Consistency — every read gets the most recent write, or an error. No stale data, ever.
  • Availability — every request gets some response, even if the data might be a little behind.

You can’t have both, once a partition actually happens. Note the framing: this isn’t “pick two of three forever.” Partition tolerance isn’t optional in any system that spans more than one machine — networks fail, that’s just physics and cables. The real choice CAP forces on you is C vs. A, and only during the partition itself.

Map that back to 2:14 a.m.: the moment our regions split, our replica read-path had already chosen A — availability. It would rather serve you a slightly stale profile than serve you nothing. That’s a legitimate choice. Plenty of systems should make it. The problem wasn’t the choice — it was that nobody had made it on purpose.

The C vs. A decision during a network partition

The C vs. A decision during a network partition

Why smart teams still get this wrong

Here’s the uncomfortable part, the bit that a textbook definition skips: most teams don’t sit down and choose C or A. They inherit whatever their database’s default replication and read settings happen to be, and they find out what they chose the same way we did — during an incident, under pressure, with a customer support queue filling up in another tab.

I’ve sat in postmortems where the actual root-cause line was some version of: “the team believed the system was strongly consistent; it was not.” Not a bug. Not bad code. A belief that didn’t match reality, formed by nobody having asked the question early enough.

This is the part that separates “I can define CAP theorem” from “I’ve had to live inside it.” The definition is free. The judgment about which tradeoff your specific system, business, and users actually need — that’s the part that took a page at 2 a.m. to teach me.

How to actually decide, before you’re the one getting paged

A few questions worth answering before a partition happens, not during one:

  • What does staleness actually cost here? A stale product price is a refund. A stale account balance is a lawsuit. Not every piece of data deserves the same answer.
  • What’s your real availability requirement? “Five nines” is a number people say in meetings. What does an actual outage cost your business per minute, and does that number justify sacrificing consistency to avoid it?
  • Does your team know what your database defaults to during a partition? Most people can’t answer this about their own systems. Find out now, not at 2 a.m.
  • Can you make the choice per-endpoint instead of system-wide? Our mistake wasn’t picking availability — it was picking it uniformly, for every field, including the ones (like account balance) where we absolutely should not have.

What changed after

We ended up splitting the profile service’s fields by tolerance: display-only fields (name, photo, bio) stayed available-first, and anything touching auth or billing switched to consistency-first, meaning it would rather return an error than a wrong number. It took a redesign, not a config change, to get there.

If you’re earlier in your career than that 2 a.m. call, here’s what I’d want you to take from it: the CAP theorem isn’t trivia for an interview whiteboard. It’s a decision your system is already making, silently, right now. The only question is whether you made it, or it made itself.

If you’ve had your own CAP-theorem 2 a.m. moment, I’d genuinely like to hear it — drop it in the comments.

Prepping for system design interviews? I put together a free cheat sheet — the questions I actually ask candidates, and what separates a pass answer from a fail one. Download it here.

If this kind of thing is useful, I write one of these every week — real incidents, system design breakdowns, no textbook fluff. The 2AM Postmortem


메타데이터
post_id
ec9f50d751bc
slug
the-cap-theorem-decision-nobody-warns-you-about-until-your-pager-goes-off-ec9f50d751bc
url
https://medium.com/@vrindag/the-cap-theorem-decision-nobody-warns-you-about-until-your-pager-goes-off-ec9f50d751bc
canonical_url
https://medium.com/@vrindag/the-cap-theorem-decision-nobody-warns-you-about-until-your-pager-goes-off-ec9f50d751bc
author_url
https://medium.com/@vrindag
status
ok
fetched_at
2026-07-16 19:32:33