Skip to main content

Why Celebrities Are Necessary

Imagine a world without celebrities.
No megastars with millions of followers. No viral posts. No single “hot” item that everyone tries to read at once.

It would be a peaceful world.
It would also be boring for distributed systems engineers.

Because without celebrities, we’d have no reason to invent half the clever scaling tricks we use today.

  • No write amplification problem (because nobody has millions of followers to blast a post into).
  • No read contention problem (because no one post is hammered by millions of requests).
  • No hot shards or hot keys.

In short:
👉 Without celebrities, distributed systems would be trivial.
👉 With celebrities, they’re fun.

Two of the key patterns that exist entirely because of celebrities are:

  • Inbox/Outbox → handles who sees what and when (solves celebrity writes).
  • Salted hashing → handles where requests land (solves celebrity reads).

Let’s walk through both.


1. Outbox pattern

  • What it solves: The fan-out problem — if one producer (say a celebrity) has millions of followers, you can’t just recompute the feed by scanning their posts every time.

  • How it works:

    • Store a canonical log of what the producer created (the outbox).
    • Followers either get pre-populated inbox entries (fan-out on write), or they pull from the outbox (fan-out on read).
  • Effect:

    • Prevents reads from hammering the same origin over and over.
    • Lets you structure distribution (e.g., bucket followers into groups that read different replicas of the outbox).

2. Salted hashing

  • What it solves: The hot key problem — when one key (e.g., post:ABC123) is so popular that all requests funnel to a single shard.

  • How it works:

    • Split that key into salted sub-keys (post:ABC123#0..99).
    • Followers are bucketed, so each group reads from a different shard.
  • Effect:

    • Spreads load for one item across multiple machines.
    • Prevents a single shard from becoming the bottleneck.

3. Why they feel similar

Both are really distribution strategies:

  • Outbox pattern: distribute who sees what and when (message fan-out).
  • Salted hashing: distribute where requests land (key placement).

So the similarity is: 👉 They both prevent “celebrity effects” from collapsing the system. One does it at the logical messaging layer, the other at the storage/routing layer.


4. How they interact in practice

They often stack in big systems:

  • Facebook/Twitter:

    • Posts live in the author’s outbox.
    • For celebrities, their posts may be salted so followers read across many shards.
    • Followers’ inboxes then contain pointers to those salted keys.

So really, salted hashing is an implementation detail inside an outbox/inbox system.


Takeaway:

  • Inbox/Outbox = structural fix for the fan-out problem.
  • Salted hashing = distribution fix for the hot key problem.
  • Both solve hotspots, but at different abstraction layers — one in data flow, one in data placement.

So next time you complain about celebrity culture, remember: without it, we’d have no reason to invent inboxes, salted hashes, or half the cool tricks in distributed systems.