DEV Community

Cover image for Global message ordering is usually a vanity requirement
lackorol
lackorol

Posted on

Global message ordering is usually a vanity requirement

Global message ordering is usually a vanity requirement.

It sounds rigorous. "Every message must be processed in the exact order it was produced, across the entire system." And it's enormously expensive to guarantee, because it forces serialization points that kill your ability to scale horizontally.

Here's the thing: no user can perceive global order. Nobody is comparing the timestamp of their message against a stranger's message on the other side of the platform. What they actually notice is order within their own conversation. If two of my replies show up swapped, that's a bug I feel. Everything else is invisible.

So the ordering guarantee that matters is per-conversation, or per-entity, or per-key. That's a scope you can partition on and scale cheaply, instead of paying for a global invariant no one will ever observe.

Before you promise strict ordering, ask: ordering of what, as seen by whom?

systemdesign #distributedsystems #messaging

Top comments (0)