Home avatar

Notes, projects and other thoughts

Bytes Over the Wire: How agar.io Stays Fast

Open devtools on agar.io and the Network tab is eerily still: no polling, no JSON endpoint, just one WebSocket handing you columns of hex. This is what those bytes say. One-byte opcodes whose meaning flips depending on which direction they’re travelling, a node record with every field at a fixed offset and not a character of it spelling out ‘x’, little-endian everywhere with a DataView gotcha that folds a whole frame into a diagonal smear, and the decision that matters most: the server holds the entire world and ships each player only their sector, so the packet scales with a screen instead of with the population. Years ago I hit the same wall with a Tornado server and JSON, and a fire took the code before I could brag about the fix.

The Update Nobody Asked For

Apps no longer update to improve — they update to join the event. A walk, with real and linked numbers, from the 2026 World Cup update frenzy to how the FOMO that powers it was designed and mass-produced — and the hype cycle that keeps getting shorter, from offshoring to AI ‘agents’.

fastfn Part 2: When a Function Isn't Enough (Services, Workloads, and the docker-compose I Didn't Want to Write)

Functions are a great shape for request/response. They’re a terrible shape for a database. This is the part of fastfn where long-lived services joined the gateway — native docker, native process, Firecracker microVM — all behind one workload config.