Every Architectural Decision Is a Bet on Which Failure You Can Live With
At some point in every technical interview, someone will say “it depends on the trade-offs” and then look at you like they have just said something profound. They have not. Saying “it depends on the trade-offs” without being able to name the specific failure each choice produces is roughly equivalent to a doctor saying “medicine has side effects” and then leaving the room. Technically accurate, completely useless, and slightly insulting to everyone present.
The reason trade-off thinking is hard to teach is that most resources explain it backwards. They start with the options and describe what each one is good at. Kafka is good for high throughput. PostgreSQL is good for strong consistency. MongoDB is good for flexible schemas. This is the comparison table approach, and it produces engineers who can recite characteristics but cannot reason about failure, which is the only thing that actually matters in production.
The correct starting point is not the options. It is the failure modes.
Every architectural decision is really a question about which failure you are willing to accept, under what conditions it will appear, and how badly it will hurt when it does. The choice between two reasonable options is always a choice between two different ways your system can break. The skill is knowing which breakage you can recover from and which one ends your evening.
A framework that actually works under pressure
Before getting into specific decisions, here is the four-question framework that every trade-off analysis in this series will use. It sounds simple because it is. Simple frameworks survive contact with a whiteboard at 10am when you have not slept well.
What are we optimising for? Not in the abstract, but concretely: latency, throughput, consistency, operational simplicity, cost, developer velocity. Pick the thing that actually matters for this system.
What are we sacrificing? The honest answer to what the first question costs you. Every optimisation trades against something else. Name it explicitly or it will name itself later, in production, at an inconvenient hour.
What breaks first? The specific failure mode, the conditions under which it appears, and roughly at what scale or load it becomes a real problem rather than a theoretical one.
How do we recover? The concrete path back to normal. Not “add more servers” but what specifically you add, what the recovery sequence looks like, and whether recovery requires a maintenance window or can happen live.
The rest of this article uses that framework to walk through the tensions that run through almost every architectural decision. The subsequent pieces in this series apply it to specific choices: Kafka versus RabbitMQ, SQL versus NoSQL, the outbox pattern, saga versus 2PC, sharding, caching, event sourcing. Each one structured around failure, not features.
Nobody chooses a bad architecture on purpose
The systems that end up in post-mortems were not designed by people who did not care. They were designed by people who made locally reasonable decisions without fully understanding which failure they were betting against. The team that chose synchronous replication was not wrong to want consistency. They just did not fully reckon with what happens to write throughput when the replica falls behind and the primary starts blocking. The team that chose eventual consistency was not wrong to want availability. They just did not fully reckon with what their support team would face when two users read different versions of the same account balance thirty seconds apart.
This is the pattern. An engineer makes a decision that is correct for the current load, the current team size, the current understanding of the problem. Six months later, one of those three things changes. The decision that was correct becomes the constraint that is now causing the incident. The post-mortem says “we should have anticipated this,” which is easy to say from the future and nearly useless as advice for the past.
Trade-off thinking does not prevent this entirely. What it does is make the bet explicit. When you name the failure mode at design time, you give yourself the chance to build monitoring for it, document it, and plan what happens when it arrives. The failure still arrives. You just do not have to spend the first forty minutes of the incident figuring out why the system is behaving this way before you can start fixing it.
Consistency versus availability and the severity problem
The most common tension in distributed systems is between consistency and availability. During a network partition, you cannot have both: you either refuse requests until you can guarantee a consistent response, or you serve requests and accept that some responses might be stale. Most systems choose a point on that spectrum rather than a hard binary, but the direction of the choice matters enormously, and the right direction depends entirely on what your application does when it gets the wrong answer.
A banking system that shows a stale balance is a legal and regulatory problem. A social media feed that shows posts from three seconds ago is barely noticeable. The failure mode is identical: a read that does not reflect the most recent write. The severity differs by roughly four orders of magnitude. Choosing eventual consistency for a social feed is completely sensible. Choosing it for a payment ledger is the kind of decision that produces very interesting conversations with auditors.
Applying the framework: what are we optimising for? Availability during partition events. What are we sacrificing? The guarantee that every read reflects the latest write. What breaks first? Any feature that depends on reads being current, which in a payment system is essentially every feature. How do we recover? Reconciliation jobs that detect and resolve inconsistencies, which works for analytics but is genuinely painful for financial data where the inconsistency might have already driven a business decision.
The CAP theorem formalises this tension, and it is worth knowing the terminology. What matters more than the theorem itself is internalising that partition tolerance is not optional in a distributed system, which means you are always choosing between consistency and availability, and that choice should be made explicitly with the failure severity in mind, not left as a default.
Latency versus throughput and why they pull in opposite directions
The second tension that runs through almost every architectural decision is between latency and throughput. Latency is how long a single operation takes. Throughput is how many operations you can complete per second. The techniques that improve throughput often hurt latency, because the most effective throughput optimisation is batching, and batching means individual operations wait longer before they are processed.
If you send each database write individually, every write pays the full round-trip cost. If you batch writes together, the per-write cost drops dramatically because you amortise the fixed overhead across many operations. Throughput goes up substantially. Latency for any individual write also goes up, because that write now waits for the batch to fill before it gets committed.
For an analytics pipeline processing a billion events per day, batching is the obvious correct choice. For a payment authorisation that a user is waiting on, batching is obviously wrong, because the user is staring at a spinner while your system waits for more events to arrive before it will process theirs.
Kafka defaults to batching. RabbitMQ defaults to per-message delivery. Neither is wrong. They are optimised for different points on the latency-throughput curve, and the engineers who complain that Kafka has “too much latency” are usually engineers who picked a high-throughput streaming platform for a low-latency task queue problem. The framework applied: what are we optimising for? If throughput, accept higher per-operation latency. What breaks first? User-facing operations that now take longer than acceptable. The decision is not about which tool is better. It is about which failure your users will notice.
Operational simplicity versus everything else
The third tension is the one that gets the least attention in interviews and causes the most damage in production: operational simplicity versus capability. Every powerful architectural pattern comes with an operational cost that does not appear in the design document and does not get discussed in the architecture review, because everyone is focused on whether the design solves the problem rather than on who is going to debug it at 2am six months from now.
Microservices give you independent deployability, technology flexibility, team autonomy, and fault isolation. The operational cost is distributed tracing across dozens of services, network latency between every call that used to be in-process, a service mesh you now have to operate, and the delightful experience of debugging a request that touches eleven services before returning an error with no useful information about which one failed.
The trade-off is not that microservices are better or worse than monoliths. The trade-off is that microservices move complexity from the codebase into the infrastructure and the operational tooling. A monolith is simpler to operate, simpler to debug, and simpler to reason about. It eventually becomes a constraint when the team gets large enough that independent deployment actually matters and the codebase is large enough that a single deployment pipeline becomes a bottleneck. The decision to move to microservices is correct at that point. Before that point, it is paying operational complexity in exchange for flexibility you do not yet need.
Applying the framework: what are we optimising for? Team autonomy and independent deployability. What are we sacrificing? Operational simplicity and the ability to debug a request as a single in-process trace. What breaks first? Observability, under any non-trivial load, when the distributed tracing infrastructure is not mature. How do we recover? You cannot easily recover from a microservices decomposition that was done too early. The migration back to a monolith is a multi-quarter project. This is the trade-off that is nearly impossible to reverse, which means the bar for making it should be high.
The same pattern runs through event sourcing, the saga pattern, CQRS, and distributed caching. The pattern solves a specific problem. It also introduces a specific class of operational complexity. The engineers who present these patterns at conferences have usually solved the problem and have not yet fully paid the operational cost, or they have paid it and chosen not to mention it because the talk is forty minutes long and failure stories take longer to tell than success stories.
The question that cuts through every design discussion
When someone proposes an architectural decision, the most useful question is not “what does this give us.” It is “what breaks first, and what does that look like when it happens.”
A good answer has four parts, which you will recognise as the framework from earlier. For Kafka: what are we optimising for is throughput and event replay. What we are sacrificing is per-message latency and operational simplicity. What breaks first is consumer lag, which appears when consumers cannot keep up with producer throughput, and the recovery path is adding consumer instances up to the partition count limit, after which you have to repartition, which requires a maintenance window. For a relational database with synchronous replication: what breaks first is write throughput under high load, which appears when replica acknowledgement latency increases, and the recovery path is either accepting degraded consistency by switching to asynchronous replication or accepting degraded availability by refusing writes until the replica catches up.
Neither of these is an argument against Kafka or relational databases. They are descriptions of the bet each decision is making. The engineer who can walk through that description without prompting, in a design review, is the engineer who has actually operated these systems under load. The engineer who can only describe the happy path is the engineer who has only read about them.
Why “it depends on the trade-offs” is the wrong answer
When an interviewer asks you to choose between two architectural options and you say “it depends on the trade-offs,” you are technically correct and practically useless. The interviewer knows trade-offs exist. They are asking you to demonstrate that you know which specific trade-offs apply to the scenario they described, and that you can reason about which failure is more acceptable given the constraints they gave you.
The answer they want sounds like this: given that this system handles financial transactions and the requirement is that no transaction can be lost, I would choose strong consistency over availability, which means during a network partition the system will refuse writes rather than risk processing a transaction twice. The monitoring I would add is write latency percentiles and replica lag, because those are the early signals that the consistency guarantee is about to cost us availability. The failure I am accepting is that the system becomes unavailable during partition events, and I would mitigate that by building the client to retry with exponential backoff and by making every transaction idempotent so retries cannot produce duplicate charges.
That answer names the failure, explains the conditions, describes the recovery path, and connects back to the specific requirement. It also sounds like someone who has actually had to make this decision and live with it.
Trade-Off Framework
- What are we optimising for?
- What are we sacrificing?
- What breaks first?
- How do we recover?
That is the whole framework. The rest of this series applies it to every major architectural decision worth having an opinion about, starting with the one that generates the most heat for the least clarity: Kafka versus RabbitMQ.
Next in this series: Kafka vs RabbitMQ: Which Failure Mode Are You Actually Buying?
Kafka vs RabbitMQ: Which Failure Mode Are You Buying?
Most comparisons between Kafka and RabbitMQ read like a real estate listing. Kafka: high throughput, distributed log…
If distributed systems and backend architecture are what you spend your reading time on, the Rust field guide is also available.
$7 — Zero to Rust: A Systems Programmer’s Field Guide
You can read the free sample here — Free 20-page sample


