FluxDeck All articles
Architecture & Engineering

One Database to Rule Them All? Why That Idea Is Quietly Wrecking Your Architecture

FluxDeck
One Database to Rule Them All? Why That Idea Is Quietly Wrecking Your Architecture

Somewhere along the way, "single source of truth" stopped being a useful design principle and became a religion. Architects defend it reflexively. Teams spend entire sprints trying to normalize data into one canonical home. And then the system slows down, coupling creeps in everywhere, and a single schema migration becomes a company-wide incident.

Maybe the sacred cow needs a second look.

The idea itself isn't wrong — having one authoritative record for critical state sounds like basic hygiene. But somewhere between theory and production, that principle mutates into something much more rigid: every service consulting the same database, every read going through the same bottleneck, every team blocked on the same schema owner. That's not a source of truth. That's a distributed monolith wearing a microservices costume.

The Hidden Cost of Canonical Thinking

Here's what nobody talks about in the architecture diagrams: enforcing a single source of truth at the infrastructure level is expensive. Not just in dollars — in latency, in coupling, in cognitive overhead, and in the kind of organizational friction that slows teams down for months at a time.

When every service has to phone home to the canonical store, you've essentially built a hub-and-spoke dependency graph. One service's read performance becomes everyone's problem. One team's data model becomes everyone's constraint. You thought you were building resilience by centralizing authority. What you actually built was a blast radius.

And the kicker? Most of the time, the data consumers don't even need the freshest possible version. A product recommendations engine doesn't need inventory counts accurate to the millisecond. A user profile sidebar doesn't need to re-query the auth database on every page render. The obsession with canonical truth is often solving a consistency problem that the actual use case never had.

When Duplication Is the Feature, Not the Bug

There's a growing set of patterns in modern distributed systems that treat data duplication not as technical debt, but as intentional architecture. Event sourcing, CQRS (Command Query Responsibility Segregation), and read-model projections all operate on this premise: let different parts of the system maintain their own local view of reality, optimized for what they actually need to do.

Take CQRS seriously for a second. The write side of your system cares about consistency and validation. The read side cares about speed and shape. Trying to serve both from the same data model is like asking a sprinter and a powerlifter to share the same training program. You get mediocrity on both ends.

Event-driven architectures push this even further. Instead of services querying a shared database, they subscribe to event streams and build their own local projections. The inventory service keeps its own count. The shipping service keeps its own. They might diverge briefly — and that's fine, because eventual consistency at the boundary is often a much cheaper problem to solve than synchronous coupling at the center.

Companies like Netflix, Uber, and Shopify have leaned hard into this model. Their systems don't share a single canonical database across services. They share events, and let each domain maintain its own truth.

Localized Truth in Practice

Let's get concrete. Imagine you're building an e-commerce platform. The classic approach says: one products database, one inventory database, one orders database. Every service reads from those. Clean, right?

Except the search service needs denormalized product data with category trees flattened for fast full-text indexing. The cart service needs a snapshot of pricing that won't change mid-session even if a sale starts. The fulfillment service needs a version of inventory that accounts for reservations, not just raw stock counts.

If all of these services are reading from the same normalized source, you end up with either massive JOIN complexity, N+1 query problems, or every team bolting on their own caching layer anyway — which is just ad-hoc duplication with extra steps and no coherent ownership.

The alternative: each service owns a read model tailored to its needs, fed by events from upstream producers. The search service builds its own index. The cart service locks pricing at session creation. The fulfillment service maintains its own reservation-aware count. Yes, these can diverge. But they diverge in controlled, predictable ways — and the seams between them are explicit, not hidden inside a shared schema.

Eventual Consistency Isn't a Failure Mode — It's a Design Choice

One of the reasons developers resist this model is that eventual consistency sounds like giving up. Like admitting defeat on data integrity. But that framing is backwards.

Strong consistency across distributed services is genuinely hard to achieve without paying enormous costs in latency and availability. The CAP theorem isn't going away. What eventual consistency actually buys you is the ability to keep each part of the system functioning independently, even when other parts are slow, down, or mid-deployment.

The real question isn't "how do I make everything consistent?" — it's "where does inconsistency actually matter, and how long is acceptable before it resolves?" For most business logic, the answer is "a few seconds is totally fine." For financial transactions, the answer is different. Treating every piece of data with the same consistency requirements as a bank ledger is over-engineering on a massive scale.

Modern tools are making this more accessible too. Systems like Apache Kafka, Confluent, and AWS EventBridge make event-driven data propagation a first-class architectural pattern. Platforms like PlanetScale and CockroachDB let you think more carefully about consistency boundaries rather than defaulting to global strong consistency everywhere.

So What Should You Actually Do?

None of this means "abandon all consistency and let chaos reign." It means being deliberate about where canonical truth actually matters and where it's just habit.

Start by auditing your read patterns. Which services are querying your central database and then transforming the data anyway? Those are candidates for local projections. Which parts of the system absolutely require up-to-the-millisecond accuracy? Protect those with strong consistency. Let everything else relax.

Then look at your team structure. Conway's Law is real — your architecture will mirror your org chart. If one team owns the canonical database that eight other teams depend on, you've built an organizational bottleneck as much as a technical one. Giving services ownership of their own data models isn't just a performance choice; it's an autonomy choice.

The goal isn't to blow up every shared database you have. It's to stop treating shared state as the default and start treating it as a deliberate, justified decision with known tradeoffs.

The Myth Worth Killing

The single source of truth was a useful mental model for a different era of software — when systems were smaller, teams were co-located, and the cost of coordination was low. Modern distributed systems operate at a scale and speed where that model becomes a liability.

Accepting that different parts of your system can hold different, locally-optimized versions of reality isn't sloppy engineering. It's mature engineering. It's acknowledging that the map is not the territory, and that trying to force the territory to conform to one map is often the most expensive thing you can do.

Build the boundaries carefully. Let the data live where it's useful. Ship faster because of it.

All Articles

Related Articles

Your Dashboard Is Gaslighting You: The Real Problem With Modern Observability

Your Dashboard Is Gaslighting You: The Real Problem With Modern Observability

Portability Is a Lie You're Paying For Every Sprint

Portability Is a Lie You're Paying For Every Sprint

Stop Hiding Behind Flexibility: The Architectural Choices You're Too Scared to Make

Stop Hiding Behind Flexibility: The Architectural Choices You're Too Scared to Make