Re:Notes on Zero-latency SQLite storage in every Durable Object
by crabmusket on Sunday October 13, 2024 @08:17PM
(#41832933)
Not an answer to your question, but shoutout to https://where.durableobjects.live/
Re:Notes on Zero-latency SQLite storage in every Durable Object
by mhart on Sunday October 13, 2024 @08:12PM
(#41832906)
By default in the region you created them in, but you can alternatively specify a locationHint. Use "oc" for Australia. https://developers.cloudflare.com/durable-objects/reference/...
Note the "Dynamic relocation of existing Durable Objects is planned for the future"
Re:Notes on Zero-latency SQLite storage in every Durable Object
by simonw on Sunday October 13, 2024 @08:37PM
(#41833048)
Thanks, added that to my post.
Re:Notes on Zero-latency SQLite storage in every Durable Object
by masterj on Sunday October 13, 2024 @08:03PM
(#41832862)
> Durable Objects do not currently change locations after they are created
> Dynamic relocation of existing Durable Objects is planned for the future.
https://developers.cloudflare.com/durable-objects/reference/....
IIRC Orleans (https://www.microsoft.com/en-us/research/wp-content/uploads/...) allows actors to be moved between machines, which should map well to DOs being moved between locations.
Re:Notes on Zero-latency SQLite storage in every Durable Object
by pests on Monday October 14, 2024 @02:59AM
(#41834934)
As actors in Orleans are virtual and persistent it can also be the case it is running nowhere.
If it's stateless it could be running in multiple locations.
I worry "Dynamic relocation of DOs" might be going a bit too granular, this should be something the runtime takes care of.
Re:Notes on Zero-latency SQLite storage in every Durable Object
by ko_pivot on Sunday October 13, 2024 @07:59PM
(#41832834)
Durable Objects have long term storage. They get hydrated from that storage, so in that sense, they can move to any Cloudflare DS. However, there is no API call to move a Durable Object. It has to have no connections and then gets recreated in the DS nearest to the next/first connection. Memory gets dropped when that happens, storage survives. (This is slightly out of date as they have some nuanced hibernation stuff that is recent).
Re:Notes on Zero-latency SQLite storage in every Durable Object
by dantiberian on Sunday October 13, 2024 @08:50PM
(#41833115)
https://where.durableobjects.live is a good website that shows you where they live. Only about 10-11% of Cloudflare PoPs host durable objects. Requests to another PoP to create a DO will get forward to one of the nearby PoPs which do host them.
Are they located in the region that hosted the API call that caused them to be created in the first place?
If so, is there a mechanism by which a DO can be automatically migrated to another location if it turns out that e.g. they were created in North America but actually all of the subsequent read/write traffic to them comes from Australia?