Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Availability vs Consistency  ›  Lesson

Weak Consistency

Weak Consistency 12 minUnder weak consistency a read after a write may or may not see that write, and the system makes no promise either way.

Weak Consistency

Hop's dashboard shows a live "clicks in the last minute" counter. It updates hundreds of times a second, and nobody will sue if it is off by three. Paying for perfect accuracy here would be wasted money. That is the home of weak consistency.

The rule

After a write, a read might see it — no promise, no apology.

With weak consistency, the system does its best but guarantees nothing. A write may show up in later reads, show up late, or be lost entirely.

It fits data that is approximate or short-lived, where being current matters more than being complete:

  • A live video or voice call. If a packet is lost, the call does not rewind to replay it; it moves on.
  • A live multiplayer game. You care where the other player is now, not where they were 200 ms ago.
  • A best-effort in-memory cache or counter that may drop values under pressure or on restart.

For Hop, the per-minute click counter lives in memory on each server. If a server restarts, that minute's count restarts too. The dashboard is briefly wrong, and nobody is harmed.

The prize is speed and simplicity: no waiting for other copies, no retries, no coordination.

The shortcut

Ask: "If this write vanished, would anyone notice tomorrow?" No → weak consistency is fine. Yes → you need a stronger promise.

Sorting Hop's dataStep 1 of 4
  1. Live per-minute counter

    Replaced every minute. A lost update is forgotten by tomorrow → weak is fine.

The trap is letting weak consistency leak into data that matters. A counter kept "just for display" often ends up feeding invoices later — check where data travels before you weaken it.

Drills

Answer fast — trust the rule.

quick drill

Under weak consistency, what is guaranteed about a read right after a write?

quick drill

Which is the best fit for weak consistency?

quick drill

A video call drops a packet. What does a weakly consistent design do?

quick drill

What does weak consistency buy you?

Remember

  • After a write, a read might see it — no promise.
  • Shortcut: "if this write vanished, would anyone notice tomorrow?" No → weak is fine.
  • Trap: weak data quietly turning into billing or record-keeping data.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainIs weak consistency acceptable here?

Hop wants a live 'clicks in the last minute' counter on each link's dashboard, kept in an in-memory counter that may lose updates if a server restarts. Explain what weak consistency means, why it is acceptable for this counter, and name one piece of Hop data where it would not be acceptable.