~learn.
0:00 / 1:07
Side quest 36 · Slack

900 people, one message, and the core sends a handful of copies

transcript

One message. 900 people, in three cities. Slack's core sends it a handful of times. Not 900.

At the peak, maybe 20,000 messages a second. But 2 point 4 million deliveries a second. Across regions.

Each channel ID hashes to one channel server. It sends one copy per gateway server. Only those with subscribers. Each gateway pushes to its own websockets. So the core never tracks a single websocket.

Each server holds about 16 million channels at peak. How? A channel is any ID events go to. A user. A workspace. An org. A file. A huddle. One mechanism for every event.

But here's the catch. One channel server dies. Whose channels stall? A sliver of everyone's. A replacement is in service in under 20 seconds. Messages were stored first. Clients fetch any gap from history.

One company spreads thinly over every server. Hash the channel. Not the company.

Full breakdown in the lecture.