← All topics

Distributed Systems & Scaling · Topic 149

Consistency levels (Strong vs. Eventual) in VDBs

Strong consistency guarantees that after a write is acknowledged, every read sees that write—useful when correctness is critical. Eventual consistency allows replicas to lag; reads may return slightly stale data until replication catches up, in exchange for lower latency and higher availability. In a distributed vector database with replication, the choice affects when newly inserted or updated vectors appear in search results and how leader-based vs. leaderless replication is configured. Many VDBs offer tunable consistency per request (e.g. read-your-writes vs. eventual).

Summary

  • Strong consistency: after a write is acknowledged, every read sees that write. Eventual consistency: replicas may lag; reads may return slightly stale data in exchange for lower latency and higher availability.
  • In a distributed VDB with replication, the choice affects when newly inserted or updated vectors appear in search and how leader-based vs. leaderless replication is configured. Many VDBs offer tunable consistency per request (e.g. read-your-writes vs. eventual).
  • See persistence and ACID, session consistency, and how index updates propagate. Pipeline: write to primary, replicate to replicas, read from primary or replica per consistency level. Practical tip: use eventual for read scaling when immediate visibility is not required.

Consistency and replication

Strong consistency: after a write is acknowledged, every read (from any replica) sees that write. Achieved by syncing writes to replicas before ack, or by routing reads to the primary. Eventual consistency: replicas may lag; a read may return stale data until replication catches up. In exchange, write latency is lower and read availability is higher because any replica can serve.

Session consistency and read-your-writes are middle grounds: the same session sees its own writes; other clients may see eventual. Pipeline: write to primary, replicate to replicas, read from primary or replica depending on consistency level. Trade-off: strong favors correctness; eventual favors latency and availability. See persistence and ACID for how durability interacts with consistency.

Index updates and visibility

When newly inserted or updated vectors appear in search results depends on when the index (or segment) is updated and replicated. Strong consistency typically requires that the read sees the latest committed index state; eventual allows reading from a replica that may not yet have the latest segment. Practical tip: use eventual for read scaling when immediate visibility of new vectors is not required.

Frequently Asked Questions

What is strong vs. eventual consistency?

Strong: after a write is acknowledged, every read sees that write. Eventual: replicas may lag; reads may return slightly stale data until replication catches up. Trade-off: correctness vs. latency and availability. See vector database architecture.

When do I need strong consistency?

When correctness is critical—e.g. financial or compliance use cases. In vector search, strong consistency ensures newly inserted vectors appear in results immediately. Replication and leader-based vs. leaderless affect how it is achieved.

Can I tune consistency per request?

Many VDBs offer tunable consistency per request (e.g. read-your-writes, session consistency, or eventual). Lets you choose stronger consistency when needed and eventual for read scaling. Check your VDB docs.

How do index updates propagate?

Depends on replication model (sync vs. async) and leader-based vs. leaderless. WAL or segment replication carries index updates to replicas; persistence and ACID interact with consistency guarantees.