skip to content
~11 min

The link goes down

, a video site, keeps every channel's , its unique name, in two , EU and US. Each holds a , a full copy of the data, and answers the people nearest to it. A link between the two carries every change from one copy to the other.

One ordinary day, Alice, a creator in Berlin, creates the channel named @nova, and the US copy soon has it. Bob, a viewer in Boston, requests the same handle: the US side checks with the EU and says it is taken.

An ordinary day. The link carries Alice's new handle to the US copy, and the US side checks with the EU before it tells Bob the handle is taken.
AliceBerlincreate @nova2ok, it's yours1KataTube · EU@nova→Alicesaved3copies the changeKataTube · US@nova→Alicecopied5checks with the EU4BobBostoncreate @nova6@nova is taken

On another day the link goes down first. Nothing has crashed: both data centres are running, and both keep getting requests. Alice creates @nova and the EU side saves it, but the change cannot cross. The US copy still says the handle is free. It has missed a change: it is , and the US side has no way to know.

Then Bob asks the US side for @nova. It cannot ask the EU now. It has two moves:

  • Answer from its own copy: “ok, it's yours”. Bob gets a reply, and @nova now has two owners.
  • Refuse: “try later”. Nobody gets a wrong answer, and Bob gets an error.
in one line

When the link between two copies of the data goes down, each side still gets requests, and must answer from its own copy or refuse.