Designing chat architecture for reliable message ordering at scale
When was the last time you used a chat service and noticed messages arriving out of order? It’s likely that you can’t think of one. Getting messages to arrive in the right order is more or less job number one of a chat service. Sounds simple. But scale this to millions of users across a global network and it becomes a complex distributed computing problem. Even at smaller scales, message ordering isn’t guaranteed once you go beyond a simple, direct connection between two users.