Cruxly

Cruxly › System design › Principles of Distributed Design

Asymmetry First

find the axis where the distribution is wildly uneven, and design to that

Open the interactive lesson

The principle: real workloads are almost never uniform. Some users have a thousand times more followers, some keys are read a million times more often, some records are a hundred times larger. Find the axis with the most extreme skew and design for that axis first, because the average case was never the thing that was going to break.

A design built around the mean is a design that works in a spreadsheet and fails in production, where the tail is not an edge case — it is the traffic.

The violation: designing for the average

Then the interviewer says: "what about a celebrity with 100 million followers?"

"Average 500 followers, so fan-out costs 500 writes per post."
→ true of almost every user, and irrelevant to the one that breaks the system

The fix: split the design along the axis of skew

followers < ~100,000  → fan-out on write  (cheap: bounded copies per post)
followers ≥ ~100,000  → fan-out on read   (cheap: post stored once, merged in)

Feed read = precomputed list  ⊕  merge of the few celebrities you follow

Finding the axis when nobody hands it to you

The skew is rarely stated in the prompt. Three questions surface it reliably:

  1. "What is the ratio between the median and the maximum?" Ask it about every quantity the design touches — followers, object size, requests per key, rows per tenant. A ratio under about 10 means the average is a usable design input. A ratio in the thousands means the tail is the design.
  2. "Which single entity, if it became extremely popular tomorrow, would hurt most?" This finds the hot-key problem before it finds you. In a URL shortener it is one viral link; in a chat system one enormous group; in a marketplace one product during a sale.
  3. "Is the skew fixed, or does it move?" A celebrity account is a stable hot spot you can special-case in advance. A flash-sale product is a moving hot spot — the identity of the hot key changes hourly, so a static allowlist is useless and the mechanism must detect and adapt at runtime. These need different answers, and conflating them is a common error.

:::key Why this principle is listed second, not last

:::

How to say it in the interview

"Before I pick an architecture I want to know the shape of the distribution, not just its average — specifically the ratio between the median and the maximum, because if that ratio is four orders of magnitude then the whole design is really about handling the tail and everything else is scaffolding."

Checklist

Practice this interactively
Share this lessonWhatsAppLinkedInX

Related lessons