VAYULearn
Colour theme
Investigate a failure
VAYU Learn

Data Architecture & Reliability

Choosing the Right Architecture - A Decision Framework

Stop Asking “What Should I Use?” Start Asking “What Does This Problem Actually Need?”

Data Architecture & Reliability
Four constraints determine most architecture decisions in data engineering: latency, volume, consistency, and team operational capacity. Everything else — Kafka, Spark, streaming, warehouses, orchestration follows from those constraints.

The architecture that fits your constraints beats the architecture that fits your aspirations.

TL;DR

  • Architecture decisions made before constraints are established are guesses dressed as engineering
  • Four dimensions drive most architecture choices: latency, data volume, consistency requirement, and team operational capacity
  • The fourth dimension — team capacity — is the one engineers consistently ignore, and it’s the one that collapses production systems most often
  • The decision matrix is not a formula. It is a set of forcing questions that prevent you from defaulting to what you already know
  • The most important question is not “what’s the best architecture?” — it’s “what’s the simplest architecture that meets these specific constraints?”

The right architecture is the one that fits the constraints. Not the one that fits the resume.


A startup built their data platform in three months. Kafka, Flink, Delta Lake, Airflow, dbt, Spark. The full modern stack.
Two data engineers ran all of it.
Six months later, one of them left. The remaining engineer spent 60% of their time keeping infrastructure alive.
The pipeline that mattered — the one that fed the revenue dashboard the CEO checked every morning — broke every two weeks. Because nobody had time to fix the underlying design.
The architecture was correct. It was just built for a team three times the size.

Most architecture decisions get made in one of two ways: someone defaults to the stack they already know, or someone copies what a larger company published on their engineering blog. Neither starts from constraints.

This blog is a framework for starting from constraints — four questions that, answered honestly, narrow the architecture decision space significantly before any tool names are mentioned.


The Problem With “It Depends”

“It depends” is the correct answer to most architecture questions. It is also the most useless answer, because it stops the conversation at the moment when the conversation should start.

The useful follow-up is: it depends on what, specifically?

The answer to that question is almost always some combination of four things: how fast the data needs to move, how much of it there is, how correct it needs to be, and how much operational capacity the team has to keep it running.

Everything else — tool choices, storage formats, processing models — follows from those four.


Dimension 1: Latency Requirement

This is the first question because it has the biggest impact on architecture complexity and cost. It also has the most room for misunderstanding.

The Decision

  • Under 1 minute → streaming or micro-batch is required
  • 1 minute to 1 hour → micro-batch. Spark Structured Streaming with a trigger interval. Simple, recoverable, cheap.
  • Over 1 hour → batch. A scheduled job. Cron, Airflow, or GitHub Actions.

The Trap

The trap is treating a preference as a requirement. “Real-time” shows up in product briefs, data strategy documents, and engineering roadmaps as an aspiration rather than a measured need.

Before accepting a sub-minute latency requirement, ask: what specific business outcome gets worse for every minute of additional delay? If the answer requires invention — if nobody can point to a concrete, measurable harm — the requirement is aspirational. Push back. Build micro-batch. The difference in operational cost between 5-second latency and 5-minute latency is significant. The difference in business outcome is often zero.

A team once spent four months building a real-time recommendation pipeline because the product spec said “real-time personalization.” After launch, analytics showed users returned to the app on average once every 18 hours. The recommendations updated every 4 hours in the old batch system. Nobody had ever noticed. Four months of streaming infrastructure, for a problem that didn’t exist.


Dimension 2: Data Volume

Volume determines which compute model is viable. This is the most objective of the four dimensions.

The Decision

The boundary between ‘fits comfortably on one machine’ and ‘requires distribution’ is usually somewhere between 50–200 GB depending on the operation, memory profile, and query pattern. Below that boundary, distributed compute is overhead, not advantage. Above it, distribution becomes necessary.

For analytical workloads in the 50 GB–10 TB range, a managed warehouse is almost always the right answer before Spark — lower operational cost, no cluster management, SQL-native, and fast enough for most query patterns. Spark earns its place when the workload is transformation-heavy, requires custom processing logic, or feeds a downstream system that expects DataFrames rather than query results.

The Trap

Spark gets used on 500 MB datasets constantly. It works — technically — but a 500 MB Spark job on EMR costs more than a DuckDB query on a laptop, runs slower due to cluster initialization overhead, and requires more debugging infrastructure. The volume didn’t justify the tool.

The corollary: volume grows. A dataset that’s 50 GB today may be 500 GB in a year. The right call is to build for today’s volume with a clear migration path, not to pre-optimize for a scale that hasn’t arrived. The architecture that handles today correctly is better than the architecture that handles next year hypothetically.


Dimension 3: Consistency Requirement

Consistency requirements are determined by what downstream consumers do with the data — specifically, whether incorrect output produces recoverable or unrecoverable business harm.

The Decision

  • Financial transactions, regulatory reporting, audit trails → exactly-once semantics, reconciliation pipelines, immutable audit logs. Duplicate or missing events are financial errors, not data quality issues.
  • Operational metrics, alerting, internal dashboards → at-least-once with idempotent writes. A metric counted 1.02× in a large aggregate is noise, not error.
  • Analytics, exploration, ML feature engineering → at-least-once is almost always sufficient. The cost of exactly-once at analytical scale is rarely justified by the use case.

The Trap

The trap runs in both directions. Teams building financial pipelines sometimes skip reconciliation because it “seems like overkill for the MVP.” Teams building analytics pipelines sometimes implement exactly-once semantics because it sounds more correct, without calculating what that correctness costs at their throughput.

The question is not “what’s the strongest consistency guarantee?” It is “what level of consistency is required to prevent measurable business harm, and what is the minimum infrastructure that provides it?”

Those are different questions with significantly different answers.


Dimension 4: Team Operational Capacity

This is the dimension engineers most consistently underweight. It is also the one that collapses production systems most often.

The Decision

Operational capacity is not about skill. A team of two excellent engineers cannot safely operate a platform designed for a team of ten. Not because they’re not good enough — because 24 hours a day has a fixed number of hours in it.

The framework:

  • One or two engineers, no dedicated on-call → managed services only. Kafka on Confluent Cloud instead of self-hosted. Databricks instead of self-managed Spark. Airflow on Astronomer instead of a self-hosted scheduler. Always-on infrastructure that requires active maintenance is a trap.
  • Small team with some platform capacity → avoid always-on stateful services. Prefer scheduled batch over streaming. Prefer managed databases over self-hosted clusters.
  • Dedicated data platform team with on-call rotation → the full stack is viable. Streaming, self-hosted orchestration, custom tooling. The operational load can be absorbed.

Why This Gets Ignored

Because the architecture is designed before the team size is fixed. “We’ll grow into it” is the justification, and it’s usually wrong. The architecture that requires a team you don’t have yet will be operated by the team you have now — under pressure, with incidents, at 11 PM.

The startup in the opening story wasn’t wrong to use Kafka and Flink. Those tools were the right choice for the technical requirements. They were the wrong choice for the operational capacity. The architecture assumed a team that didn’t exist.

The fix: treat team operational capacity as a first-class architectural constraint, equal in weight to latency and volume. The architecture that a two-person team can keep running beats the architecture that a ten-person team would theoretically prefer.


Before moving to the decision matrix, one observation that unifies all four dimensions:

Every dimension above is a cost in disguise.

Latency cost: lower latency requires always-on infrastructure, which costs money continuously.

Volume cost: larger data requires more compute, which costs money per job.

Consistency cost: stronger guarantees require more complex infrastructure, which costs engineering time and operational overhead.

Operational capacity cost: this is the human side of cost — the engineering hours required to keep the system running, debug failures, and respond to incidents.

Cost is not a fifth dimension. It is the common unit that all four dimensions convert into.

When an architecture decision is hard to resolve, convert all four dimensions into their cost expression and compare. A micro-batch architecture costs $X/month in infrastructure and Y hours/month in maintenance. A streaming architecture costs $3X/month and 3Y hours/month. If the latency improvement doesn’t produce measurable business value exceeding that difference, the cheaper architecture is correct.

This framing also makes it easier to have the conversation with non-engineers. “This architecture costs $2,000/month more and requires 15 additional engineering hours per month to maintain — what business outcome justifies that?” is a more productive conversation than “should we use Kafka or Spark Structured Streaming?”


Putting It Together — The Decision Matrix

These four dimensions combine into a set of architecture patterns that cover most production data engineering scenarios:

The top rows are chosen far less often than they should be. The bottom rows are chosen far more often than they should be.

The matrix is not prescriptive. It is a forcing function. If your answers land you in row 1 but your team is planning row 5, the question is: which constraint is wrong?


A Worked Example

A B2B SaaS company wants to build a pipeline that tracks user activity and surfaces it in an internal dashboard for the customer success team.

Latency requirement: The CS team checks dashboards in their morning standup. Updates within 2 hours are fine. → Batch.

Volume: 50,000 events per day. At ~1 KB per event, that’s ~50 MB daily. → Single machine, no distribution needed.

Consistency: Internal dashboard. A missed event occasionally is tolerable. Duplicate counts in large aggregates are noise. → At-least-once, no reconciliation required.

Team capacity: Two engineers, no dedicated platform time. Both are already running other systems. → Managed services, minimal always-on infrastructure.

Architecture: A daily Airflow DAG (or a GitHub Action) that reads events from Postgres, runs a dbt transformation, and writes to a BI tool’s database. DuckDB for any intermediate aggregations that need it. No Kafka, no Spark, no streaming.

Total infrastructure: a Postgres database they already have, a GitHub repository, and a BI tool.

If someone on this team proposes Kafka and Flink, the right question is: which of the four dimensions changed to justify that?


The Question Nobody Asks

There is a question that would prevent most overengineering, and it almost never gets asked in architecture discussions:

What would have to be true for this architecture to be wrong?

It forces the team to name the assumptions embedded in the design. A streaming architecture is wrong if the latency requirement turns out to be 30 minutes instead of 30 seconds. A distributed compute architecture is wrong if the data volume stays at 20 GB. A complex consistency model is wrong if the downstream consumer is an internal dashboard that nobody audits.

If those assumptions are made explicit, the team can check them. If they change, the design can be revisited before the infrastructure is built around them.

Assumptions that are never named are the ones that produce the most expensive surprises.


Final Takeaway

Architecture decisions are not technical choices. They are constrained optimization problems.

The right architecture is not the most scalable, the most impressive, or the most aligned with what large companies use. It is the simplest system that correctly meets the specific constraints of the problem — latency, volume, consistency, and the operational capacity of the team that will run it.

📌 Core Principle

The architecture that fits your constraints beats the architecture that fits your aspirations. Build for what the problem needs. Not for what the resume would benefit from.

Next in Series

Data Contracts and Schema Governance at Scale

The architecture is chosen. The pipelines are running.

Three months later, a producer changes a field type. A consumer silently starts receiving nulls. A model degrades. Nobody knows why.

Next: data contracts — the mechanism that makes schema evolution a managed process instead of a game of broken telephone between teams that don’t talk to each other.