packagemain.tech

packagemain.tech

Persistent multiplayer state without chaos

How I keep a live multiplayer game consistent with PostgreSQL holding the truth and Redis doing the fast work

Julien Singler's avatar
Julien Singler
May 25, 2026
∙ Paid

In a single-player game, state is easy. There’s one player, one save file, and as long as you don’t corrupt the file, you’re fine.

In a live multiplayer game, state is the hardest problem you’ll have. Two players can act on the same target at the same time. A scheduled job (a build, a launder, a raid) needs to resolve at exactly the right moment regardless of who’s online. A player can come back after three days and expect their progress to be where they left it, plus whatever happened in the world while they were gone.

You can’t naively keep this in memory. You can’t lazily flush to disk on logout. You need a real persistence story, and you need it to handle concurrent access without melting.

Here’s the architecture I landed on.

User's avatar

Continue reading this post for free, courtesy of Alex Pliutau.

Or purchase a paid subscription.
© 2026 Aliaksandr Pliutau · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture