# Why Two People See Different Instagram Like Counts: CAP Theorem at Production Scale

- Source: https://intervueclub.com/blog/instagram-like-counts-cap-theorem
- Author: Dhananjay Aggarwal
- Published: 2026-01-05
- Tags: consistency, cap-theorem, distributed-systems

One user sees 120 likes, another sees 121. Instagram chose availability over consistency for engagement counts, and kept strong consistency where it matters.

If you have ever refreshed an Instagram post and noticed the like count differ by one between two people viewing the same post, you have seen a distributed systems trade-off in action. This is not a bug, a cache glitch or a UI race condition. It is a deliberate architectural decision rooted in the CAP theorem and enforced at production scale.

This article breaks down what is happening, why it happens, and why the system is designed this way.

## The Observable Symptom

Two users view the same post within a short window.

- User A sees 120 likes
- User B, moments later, sees 121 likes

Both views are correct for the system state at that moment. The mismatch is temporary and resolves itself.

![User A's phone shows the post with 120 likes and User B's phone shows the same post with 121 likes.](https://intervueclub.com/blog/instagram-like-counts-cap-theorem/2.webp)

This behavior is not accidental. It is a direct consequence of how Instagram prioritizes system guarantees.

## CAP Theorem Refresher, Without the Hand-Waving

In a distributed system, you cannot guarantee all three of these properties at once:

- **Consistency:** every read reflects the most recent successful write.
- **Availability:** every request gets a non-error response, even during failures.
- **Partition Tolerance:** the system keeps operating despite network splits or delayed communication between nodes.

Network partitions are not theoretical. At global scale, they are a constant reality, which removes the option of dropping partition tolerance. The real choice is between consistency and availability during partitions.

## Instagram’s Explicit CAP Choice

Instagram operates as an AP system for engagement metrics like likes.

### Availability First

- Feed loads must never block.
- Likes must render instantly.
- User interaction cannot wait for cross-region coordination.

### Partition Tolerance Is Non-Negotiable

- Data is replicated across regions.
- Network latency and packet loss are expected.
- Regional isolation must not take the app offline.

### Strong Consistency Is Sacrificed Temporarily

- Like counts can diverge briefly.
- Reads may return slightly stale values.
- The system does not take a global lock on every write.

This is eventual consistency by design, not by compromise.

![The CAP triangle with Availability and Partition Tolerance ticked and Consistency crossed out.](https://intervueclub.com/blog/instagram-like-counts-cap-theorem/3.webp)

## Why Strong Consistency Would Be the Wrong Choice

Enforcing strong consistency for likes would require coordination across replicas before serving reads or confirming writes.

That introduces several problems:

- Cross-region quorum latency on every like.
- Feed rendering blocked on consensus.
- Cascading delays during partial outages.
- Worse tail latency, even during normal operation.

A like count that is off by one has negligible semantic impact. A frozen feed does not.

From a product and engineering perspective, availability outweighs numerical exactness.

## How the Like Write Path Actually Works

A simplified flow looks like this:

1. User taps like.
2. A nearby region accepts the write.
3. The local replica updates immediately.
4. The write propagates asynchronously to other replicas.
5. Other regions catch up over time.

Reads are served from the nearest replica, not from a globally serialized source of truth.

![Client A writes to Region 1, which replicates to Region 2 over asynchronous links.](https://intervueclub.com/blog/instagram-like-counts-cap-theorem/4.webp)

## Eventual Convergence and Correctness

Although reads may diverge for a while, the system guarantees convergence.

- All likes are durably recorded.
- Replicas reconcile in the background.
- Conflicts are resolved deterministically.
- Counts eventually reflect the true total.

This is not relaxed correctness. It is delayed visibility.

Temporary inconsistency is allowed. Permanent inconsistency is not.

## What Instagram Does Keep Strongly Consistent

Not all data follows AP semantics. Certain paths demand strict guarantees.

Strong consistency is enforced for:

- Authentication and session validity.
- Payments and ad billing.
- Username uniqueness and identity mapping.
- Security-critical state transitions.

These operations cannot tolerate divergence, even briefly. They typically rely on tighter coordination, stronger isolation and more conservative availability trade-offs.

![Two columns: AP covers like counts, feeds and replicas; CP covers auth, payments and usernames.](https://intervueclub.com/blog/instagram-like-counts-cap-theorem/5.webp)

## The Engineering Principle Behind the Decision

Distributed systems are not built around absolutes. They are built around impact.

Instagram accepts minor, temporary numerical drift because:

- The user experience stays fluid.
- The system stays resilient under failure.
- Global scale becomes tractable.

The CAP theorem is not an academic constraint here. It is an operational reality enforced millions of times per second.

The next time two people see different like counts, they are watching a production-grade consistency trade-off do exactly what it was designed to do.
