Durable Objects: could it be regionally shared but not globally?

I am willing to deploy an online game using CF worker, which require regional real-time communication among players in a game. It acts somewhat like a dota coordinator server so it is required to be regionally shared.
Durable objects seem to fit the need, with which I can hold a shared data set for each region, so that players connecting to the same region can communicate.
But if I understand it correct, persistent storage of durable object will eventually be synced globally, which is not what I want. It seems that the in-memory storage is regionally-local, but as a worker, it might be stopped and restarted anytime.

So, could durable objects act as the way I want ?

Sure you can, but you’ll have to adress disconnects and reconnects in the browser/game client.


Since it’s still in beta and there are some bugs, be sure to test it properly.

1 Like