In 2026 “do I need distributed SQL?” is the question every backend team asks at some point. The honest answer is probably not — a single-node Postgres handles vastly more than people give it credit for. But when distributed SQL is the right call, getting it right matters. This post is the working knowledge.

What distributed SQL is

A traditional database = one machine running Postgres / MySQL. A distributed SQL database = many machines that look like one Postgres / MySQL, with the data sharded automatically and transactions coordinated across nodes.

Key properties:

  • Horizontal scale-out for both reads and writes.
  • Transactions across nodes with strong consistency.
  • Survival of node failures without data loss.
  • Multi-region options (with regional latency tradeoffs).

The trade for these: latency. A transaction across 3 regions is bound by the speed of light. Even within a single region, distributed coordination costs milliseconds that a single-node DB doesn’t pay.

The contenders

CockroachDB

  • Architecture: Postgres-compatible wire protocol; data split into 64 MB ranges, each replicated to 3+ nodes via Raft.
  • Strengths: Self-host or managed, open core, multi-region, geo-partitioning.
  • Weaknesses: Higher latency than single-node Postgres for most queries; some Postgres extensions unavailable.

Google Cloud Spanner

  • Architecture: Globally distributed, TrueTime (atomic clocks + GPS) for external consistency.
  • Strengths: Strong consistency at global scale; horizontal write scale; managed only.
  • Weaknesses: GCP-only; expensive minimum footprint; SQL dialect is mostly-Postgres but has differences.

YugabyteDB

  • Architecture: Postgres frontend (literally the Postgres parser/executor) on top of a distributed storage layer. Most Postgres extensions work.
  • Strengths: Best Postgres compatibility of the distributed SQL family; open source; geo-distribution.
  • Weaknesses: Smaller community than Cockroach; performance characteristics differ from single-node Postgres.

TiDB

  • Architecture: MySQL-compatible. Separate compute (TiDB) and storage (TiKV) layers.
  • Strengths: MySQL ecosystem; HTAP (combined transactional + analytical) via TiFlash columnar replicas.
  • Weaknesses: MySQL-only; less popular for Postgres-shaped workloads.

Citus (Postgres extension)

  • Architecture: Sharded Postgres. Tables are distributed by a shard key; queries are routed.
  • Strengths: Real Postgres; familiar tools; gentle scale-up path.
  • Weaknesses: Cross-shard transactions are limited; the shard key choice is a permanent decision.

AlloyDB / Aurora DSQL

  • Cloud-vendor distributed Postgres-compatibles (GCP AlloyDB, AWS Aurora DSQL).
  • Best for cloud-native shops that already prefer the vendor’s managed services.

When distributed SQL wins

A few scenarios that genuinely need it:

1. Multi-region active-active

You have users in India, the US, and Europe. They each need low-latency writes (login, posting, transactions). A single-region Postgres in us-east-1 makes Indian users wait 200ms on every write.

Distributed SQL with regional partitioning lets each region’s writes go to its local replica with strong consistency where the data is partitioned by region.

2. Write-heavy beyond a single primary

Postgres on a beefy machine (128 vCPUs, 768 GB RAM) handles tens of thousands of writes/sec. Past that, you’ve maxed out a single primary. Distributed SQL gives you horizontal write scale.

3. Workloads where read replicas don’t help

If your bottleneck is writes, Postgres read replicas don’t move the needle. Distributed SQL spreads the writes themselves.

4. Strict global-serializability requirements

Financial systems where transactions must serialize globally — distributed SQL’s strong consistency primitives are designed for this.

When Postgres is still enough

The typical SaaS backend in 2026 fits comfortably on one well-tuned Postgres + read replicas:

  • Up to ~50 TB of data with partitioning.
  • Tens of thousands of QPS.
  • Multi-region reads via logical replication to follower regions.
  • Multi-region writes via app-level sharding by tenant region (a customer’s data lives in their region’s DB).

For most teams, the answer to “do I need distributed SQL?” is “not yet.” Plan the migration path; defer the cost.

See PostgreSQL 18 for what modern single-node Postgres can do.

What you give up

Distributed SQL imposes real tradeoffs:

1. Latency

A simple write transaction in Postgres: 1–5 ms. The same in CockroachDB: 5–20 ms. Across 3 regions in a global Spanner: 100–300 ms.

If your SLO is sub-10ms p99 and your workload doesn’t actually need distribution, distributed SQL hurts.

2. Operational complexity

A Postgres node has well-known failure modes. A 9-node Cockroach cluster has more. Plan for the team capacity.

3. Ecosystem gaps

Some Postgres extensions don’t run on Cockroach / Yugabyte / Spanner. pgvector support varies. PostGIS varies. TimescaleDB doesn’t exist for these. Check before committing.

4. Application-layer changes

  • Long transactions are riskier (more chance of cross-node contention).
  • Foreign keys may need rethinking under sharding.
  • Auto-incrementing IDs become a hot row; use UUIDv7 or snowflake IDs (see Postgres 18 uuidv7 ).

Migration realities

Migrating from single-node Postgres to distributed SQL is real work. The best path:

  1. Confirm you actually need it. Profile, not feel.
  2. Pick the right product. Cockroach for multi-cloud / self-host; Spanner if all-in on GCP; Yugabyte if you need maximum Postgres compatibility.
  3. Test compat thoroughly. Run your full test suite. Find every feature you use that doesn’t translate.
  4. Pick a shard key carefully. Tenant ID is usually right for SaaS. Once chosen, hard to change.
  5. Plan a dual-write phase. Write to both old and new for some period; verify consistency.
  6. Cut over. Have a rollback plan.

Budget months, not weeks.

Common patterns

Geo-partitioning

Cockroach lets you bind data to regions:

ALTER TABLE users
  CONFIGURE ZONE USING constraints = '{"+region=ap-south-1": 1, "+region=us-east-1": 1, "+region=eu-west-1": 1}';

ALTER TABLE users
  PARTITION BY LIST (region) (
    PARTITION ap VALUES IN ('IN','SG','AU'),
    PARTITION us VALUES IN ('US','MX','CA'),
    PARTITION eu VALUES IN ('GB','FR','DE')
  );

Each partition’s leader is in the matching region. Local writes are fast; cross-region reads are still consistent.

“Follower reads” for stale-but-fast

SET TRANSACTION AS OF SYSTEM TIME '-5s';
SELECT * FROM orders;

Read from any replica with up-to-5-seconds-stale data. No coordination cost. Great for reports, dashboards, recommendations.

Avoid hot ranges

Sequential keys → hot range. Cockroach/Yugabyte hash-partition by default; if you create a BIGSERIAL ID, you concentrate inserts on one range. Use UUIDv7 or distribute the prefix.

Cost in 2026 (rough)

Self-host minimumManaged minimum
Postgres single-node$50/mo VM$50/mo (RDS small)
Cockroach 3-node$300/mo VMs~$300/mo Cockroach Cloud Serverless
Spannern/a~$650/mo Standard edition entry
Yugabyte 3-node$300/mo VMs~$300/mo Yugabyte Cloud
Citus on Postgres$50–150/mo~$200/mo Azure Hyperscale

Distributed SQL is meaningfully more expensive than single-node Postgres. Worth it only when the architecture earns the cost.

What I’d actually pick today

  • New SaaS backend, single-region: Postgres 18, single-node + read replicas.
  • Same, multi-region by tenant: Postgres per region, app-level routing by tenant.
  • Genuinely global write workload: CockroachDB. Or Spanner if you’re committed to GCP.
  • You’ve outgrown one Postgres but stay single-region: Citus.
  • MySQL ecosystem with HTAP needs: TiDB.

Read this next

If you want my “do I really need distributed SQL?” assessment template, it’s at rajpoot.dev .


Building something AI-, backend-, or data-heavy and want a second pair of eyes? I do consulting and freelance work — see my projects and ways to reach me at rajpoot.dev .