Latency on worker and Durable object

Hi guys, Is the latency between the Worker and the Durable object expected to be around 100-160ms provided that they both are in the same location?
4 Replies
hfcRed
hfcRed2mo ago
There is no guarantee that the DO is in the same location as the worker instance Not every datacenter is capable of holding them Depending on what you use the DO for, latency can also vary as it might have to do a global lookup first I think this is especially the case when first creating a new instance using an ID derived from a name
Suman!
Suman!OP2mo ago
How can we ensure consistent sub-100ms response times when using Durable Objects, given that both the client and the Durable Object are located in the same region? We've observed response times exceeding 100ms and are seeking ways to optimize performance.
Jehu
Jehu2mo ago
@hfcRed we are new to DOs. We’ve never seen worker-to-DO latency be less than 120ms no matter where or how we create them. Is your experience similar to ours?
hfcRed
hfcRed2mo ago
DOs are geographically pinned to where theyre created, so if two users from different parts of the world want to use the exact same DO instance they will have to travel to the one instance to use it, which will result in different and sometimes long latencies I personally have never measured it because DOs are expected to have more latency to them and I have never found it to be noticable DOs and KV always have the tradeoff of consistency vs latency You will never achieve the same latency with DOs as you do with KV 120ms is still pretty quick if you ask me, if you really do rely on sub 100ms speed you should look into possible KV implementations of whatever youre trying to do
Want results from more Discord servers?
Add your server