BASE vs ACID

ACID gives single-node transactional guarantees; BASE trades them for availability and scale with soft state and eventual consistency.

The problem

ACID transactions are easy to reason about but get expensive when data is spread over many nodes. BASE describes the relaxed contract that large-scale systems adopt to stay available and fast.

How it works

  • Atomicity: all or nothing (undo/redo log). Consistency: constraints hold before and after (an application-level invariant). Isolation: concurrent transactions behave as if serial (levels: read committed, repeatable read/snapshot, serializable). Durability: committed data survives crashes (WAL + fsync).
  • BASE = Basically Available, Soft state (state may change without input while replicas converge), Eventually consistent.
  • Not a binary choice: many systems offer ACID within a partition/shard and BASE across partitions.
  • Isolation anomalies to know: dirty read, non-repeatable read, phantom, lost update, write skew.
  • Making BASE safe: idempotent operations, versioned writes, compensations, and reading your own writes via sessions.

In real systems

  • PostgreSQL / MySQL InnoDB — Classic single-node ACID; Postgres default is read committed, MySQL InnoDB default is repeatable read.
  • Spanner / CockroachDB / TiDB — Distributed ACID with serializable (or snapshot) isolation via consensus plus 2PC.
  • Cassandra / DynamoDB — BASE by design; lightweight transactions (Paxos) / TransactWriteItems add scoped ACID.
  • Kafka — Transactions give atomic multi-partition writes and read-committed consumers, not general ACID.

Trade-offs

Pros

  • ACID: simple correctness model, fewer application bugs
  • BASE: higher availability, horizontal scale, lower latency

Cons

  • ACID: coordination cost, lower availability when distributed
  • BASE: anomalies leak into the application; needs idempotency and reconciliation

← All distributed systems entries