Replication Engine
Delta encoding and interest management that took replication from 900 KB/s down to 2 KB/s.
A high-traffic Roblox experience was saturating client bandwidth. I rebuilt the replication layer around delta encoding and interest management, sending only what changed and only to players who needed it.
The problem
Naive state replication broadcast full snapshots to every client every tick - roughly 900 KB/s per player, enough to cause stutter and disconnects on weaker connections.
The solution
I introduced delta encoding (send only changed fields), interest management (replicate only to nearby/relevant players), and a priority scheduler for bandwidth budgeting. The result was a 450× reduction to ~2 KB/s.
Architecture
A server-authoritative state store diffs each tick, a relevance graph decides which entities each player sees, and a serializer packs deltas into compact buffers prioritized by a per-player bandwidth budget.
Features
Technical decisions
Challenges & lessons
Balancing CPU spent computing deltas against the bytes saved - too aggressive and the server melts; too loose and bandwidth creeps back up.