~learn.
0:00 / 1:13
W06 · Presence and chat

Your green dots can cost twice your messages.

transcript

Your app's green dots can cost more than every message sent. Twice as much. Here's the math.

5 million chat users online at peak. Each one flips online, idle or offline 4 times an hour. And each has 150 contacts.

Tell every online contact about every change? 84,000 pushes a second. Every message in the whole app? About 39,000.

Twice your message traffic. For a tiny dot. And here's the catch. Most of those contacts aren't even looking.

The old way: every contact, every flip. The fix: your app subscribes only to people on its screen. Now it's about 22,000 a second. Half your messages.

Slack did exactly this. Presence events fell by a factor of 5. Discord sends only the visible part of its member list. LinkedIn uses a topic per member.

One more trap. Phones flap online and offline in lifts. Skip debouncing, and even this hits 167,000 a second.

Knowing who's online is cheap. Telling people is the expensive part.

Full breakdown in the lecture.