3 September 2026
A party belongs near the people in it
The distance problem in this app was never bandwidth. It is the clock.
Read the post
Every phone in a party works out where the music should be by measuring its own offset from one server, the way NTP does. Send it the instant the song started and it can calculate, for itself, exactly where the playhead ought to be right now. Nothing ever has to say “play”.
That measurement is only ever as good as the round trip it rides on. A phone in London talking to a server in Mumbai is 200 milliseconds away, and more to the point the variation in those 200 milliseconds is large. Jitter is the one thing a sync algorithm cannot see through: it can average out noise given time, but noise is exactly what it is trying to measure against.
The obvious answer is a CDN, and it is the wrong one. A CDN caches content, and content was never the problem — an uploaded track is fetched by six people in one room, once, and deleted within hours. There is nothing to cache. What needs to be close is not the file. It is the clock.
Why this turned out to be easy
A party is a room. Everybody in one is in one place. That single fact removes almost all of the difficulty, because it means regions never have to talk to each other. There is no shared database, nothing to replicate, no consensus to reach, no clock to reconcile across an ocean. Each region is a complete, independent copy of the whole app.
Two pieces make it work.
Where a new party goes. The app asks every region for the time and keeps whichever answers soonest. Not a guess from an IP address — a measurement. Geo-IP gets a VPN wrong, gets an oddly routed mobile network wrong, and gets any country whose servers sit outside its borders wrong. Asking “which of you is nearest” gets all three right, and it costs one extra request because it is the same probe the clock runs anyway.
How a join finds it. The first character of the party code says which region holds it. 2K7QMX is India, 3ABCDE is the United States. Any phone, anywhere, reads the code and talks to the right server directly. No lookup, no directory service, no round trip to find out where to go.
The whole routing layer is about ninety lines. With one region configured it behaves exactly as a single server always did, which is the property that mattered most: nothing about it is speculative infrastructure waiting for a second deployment to justify itself.