BASE
An alternative to ACID for distributed systems: Basically Available, Soft state, Eventually consistent. Trades strong consistency for availability.
What is BASE?
In short
BASE is a consistency model for distributed databases that stands for Basically Available, Soft state, and Eventually consistent. Instead of guaranteeing every read sees the latest write right away (as ACID does), a BASE system stays available under failure and lets all copies of the data converge to the same value a short time later.
What BASE actually means
BASE is the answer to a question ACID could not solve cheaply: how do you keep a database online and fast when the data lives on dozens or hundreds of machines spread across the world? The acronym breaks into three promises that are deliberately weaker than ACID's.
Basically Available means the system answers every request, even during a partial failure. You might get slightly stale data or a partial result, but you do not get a hard error or a hung connection. Soft state means the data can change over time even without new writes, because the system is still reconciling copies in the background. Eventually consistent means if writes stop, every replica will agree on the same value after some delay, usually milliseconds to a few seconds.
The core trade is right there: ACID buys you correctness on every single read by sometimes refusing service, while BASE buys you uptime and low latency by sometimes serving data that is a beat behind.
How it works under the hood
A BASE system stores multiple copies of each piece of data on different nodes. When you write, the write is accepted by one or a few nodes and acknowledged immediately, before all replicas have the new value. Background replication then pushes the change to the rest.
Because copies can briefly disagree, the system needs a way to settle conflicts. Common techniques are last-write-wins using timestamps, vector clocks that track causal order, or merge logic where the application reconciles two versions. Amazon's Dynamo paper popularized vector clocks plus client-side conflict resolution for shopping carts.
Many systems expose tunable consistency so you are not locked into one extreme. In Cassandra you choose a consistency level per query: write to ONE node for speed, or require QUORUM (a majority of replicas) to acknowledge before the write counts. When read quorum plus write quorum exceed the replica count, you get strong consistency on that operation while keeping BASE behavior everywhere else.
When to use it and the trade-offs
BASE fits data where a few seconds of staleness costs nothing: social media feeds, view counts, product catalogs, session stores, shopping carts, IoT telemetry, and analytics. These workloads value being always-on and globally fast over being perfectly current.
Avoid BASE where a stale read causes real harm. Bank account balances, inventory at the moment of checkout, seat reservations, and anything with a uniqueness rule usually need ACID transactions and strong consistency. Reading an old balance can let a customer overdraw or double-spend.
The hidden cost of BASE is in your application code. Because the database no longer hides inconsistency, you have to design for it: handle the case where two devices wrote different values, make operations idempotent so retries are safe, and decide what to show a user who reads before replication finishes. The CAP theorem frames the choice plainly: during a network partition you pick availability (BASE) or consistency (ACID), not both.
A concrete example
Picture liking a post on Instagram. You tap the heart and the count jumps instantly because the write was accepted by one nearby replica and acknowledged right away. That is Basically Available and fast.
For the next second or two, a friend in another region might still see the old count, because their replica has not received the update yet. That gap is Soft state. Neither of you sees an error, and the app stays snappy.
Within a couple of seconds the replication finishes and every replica shows the same number. That is Eventual Consistency. Nobody was harmed by the brief disagreement, and Instagram never had to take the feature offline or block your tap waiting for global agreement. A bank ledger would make the opposite choice; a like counter is a textbook fit for BASE.
Where it is used in production
Amazon DynamoDB
Built on the original Dynamo design; defaults to eventually consistent reads for low latency and high availability, with strongly consistent reads available as an opt-in.
Apache Cassandra
Wide-column store with tunable per-query consistency levels (ONE, QUORUM, ALL) so teams pick the BASE-to-strong balance they need.
Riak
Key-value store modeled closely on the Dynamo paper, using vector clocks and read repair to converge replicas after conflicting writes.
Couchbase / CouchDB
Document databases that accept writes locally and replicate asynchronously, reconciling versions so distributed and offline-first apps stay available.
Frequently asked questions
- Is BASE the opposite of ACID?
- They sit at opposite ends of a spectrum but are not enemies. ACID guarantees every read is current at the cost of sometimes refusing service; BASE guarantees the system stays available at the cost of brief staleness. Many real systems use both: ACID for money and inventory, BASE for feeds and counters.
- Does eventually consistent mean my data can be wrong?
- No. It means different replicas can briefly disagree, but if writes stop they all converge to the same correct value. You never lose data; you just might read a slightly old version for a short window, typically milliseconds to a couple of seconds.
- How is BASE related to the CAP theorem?
- CAP says that during a network partition you must choose between consistency and availability. BASE is what you get when you choose availability: the system keeps answering and reconciles later. ACID with strong consistency is what you get when you choose consistency and reject requests during the partition.
- Can I get strong consistency from a BASE database?
- Often yes, per operation. Systems like Cassandra and DynamoDB let you request quorum or strongly consistent reads when a specific query needs it, while the rest of your traffic stays eventually consistent for speed.
- What does soft state actually mean?
- It means the stored data can change on its own over time, without a new client write, because background processes are still replicating and reconciling earlier writes across nodes. The state is not fixed the instant a write is acknowledged.
Learn BASE hands-on
This page explains the idea. The full lesson lets you step through the ring as servers join and leave, read the implementation, and check yourself with a quiz. It is one of 760+ lessons in the System Design Masterclass, from your first API call to distributed consensus. Eleven Foundation lessons are free, no signup. Lifetime access is ₹499 in India or $7.99 worldwide, one payment, no subscription.
Related lessons
Lessons that touch on BASE as part of a larger topic.
Database Profiling
Find slow queries and optimize database performance. EXPLAIN plans, index analysis, and query rewriting
advanced · reliability resilience
Database Query Caching
Letting the database cache query results so the same question gets an instant answer
foundation · caching strategies
Database Functions
Reusable logic that lives inside the database, computed columns, transformations, and business rules
foundation · database fundamentals
Database Indexing
B-trees, hash indexes, composite indexes, covering indexes, the single biggest performance lever in any database
foundation · database fundamentals
Database Connection Pooling
PgBouncer, HikariCP, and why opening a new database connection per request is a recipe for disaster
foundation · database fundamentals
See also
Related glossary terms you might want to look up next.
ACID
Four guarantees for database transactions: Atomicity (all or nothing), Consistency (valid states only), Isolation (no interference), Durability (changes persist).
CAP Theorem
In a distributed system, you can only guarantee two of three: Consistency, Availability, and Partition tolerance. You must choose your trade-off.
NoSQL
Databases that don't use traditional table-based relational models. Includes document stores, key-value, graph, and column-family databases.
Database
An organized collection of data that can be easily accessed, managed, and updated. The backbone of almost every application.
SQL
Structured Query Language for managing relational databases. Tables, rows, columns, and powerful joins to query related data.
Sharding
Splitting a database into smaller pieces (shards) distributed across multiple servers. Each shard holds a subset of the data.