Milan
Milan
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Hmmm I'm not sure, you should ask this in the main channel since someone there will probably know. In the meantime I'm going to close this thread because it's moving away from the original topic, which has been resolved.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
You mean the remaining quota until you start getting charged?
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
I think we only charge inbound messages though (for requests)? Be sure to double check our pricing page
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Should be, yeah
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
This is actually a very good question, so thanks for asking it. I suspect regular websocket receives don't show up in the dashboard, rather, they would show up in GraphQL https://developers.cloudflare.com/durable-objects/observability/graphql-analytics/#websocket-metrics. Hibernatable websockets are different, we're delivering events to top-level request handlers (webSocketMessage/Close/Error()), so they would show up in your dashboard
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
I'll get back to you some time next week, we have a separate mechanism for billing websocket hibernation invocations but I'm not too familiar with it
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
No prob, hope the game development goes well 🙂 .
If I keep using new names to avoid pinning, is there a limit on the number of names?
We don't limit the number of Durable Object "instances" https://developers.cloudflare.com/durable-objects/platform/limits/ You might actually want to use newUniqueId() (instead of idFromName()) if each DO instance is just a single game session.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Once you've created an ID, you've pinned that named instance of a DO to a region forever.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Try sending another request to the previous DO with the same name from before, you'll see it will still run in Eastern North America.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
I thought the DO should have been cleared as well.
Hmm, what do you mean by "cleared"?
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
It depends what you mean by recreated. If you mean "will my DO instances currently executing JS be evicted from memory?" the answer is yes, but then upon receiving new requests, those DO instances will run in probably the same colo, and definitely the same region. If you mean "will my DOs be completely destroyed and then be able to run elsewhere in the world, like move from enam to oc" the answer is definitely not, since once an ID is created it will always run in that region.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Does that help?
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
If I make a DO instance called let id = stub.idFromName("some_new_name");, and the DO gets created in IAD, then for the rest of time the DO instance stub.idFromName("some_new_name") will live in enam. It doesn't matter if you don't send a request for a year, it'll still map to the enam region. If you want a DO that's in SJC, you need to make another DO instance, ex. stub.idFromName("ANOTHER_new_name"), don't provide a location hint, and it will be created close to the Worker that invoked it.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
You mean can you specify a colo rather than a region? No, and even if you could, the DOs would occasionally move out of the specified colo to another colo in the region if the "home" colo had issues (ex. network is down).
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
BTW, is this WS latency or fetch? the 20 ms?
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Your DO will not move to another region on its own, you would need to make a new DO and try to create it closer to your clients.
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
The only way we would've created the DO in IAD is if your first request was close to IAD, or you specifically provided a location hint enam
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
If you don't provide a location hint, the first time you ever send a request to a DO it will be created as close to the Worker as possible
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
What loaction did you provide?
77 replies
CDCloudflare Developers
Created by geekergame on 9/12/2024 in #durable-objects
I created a real-time server using
Was the DO initially created by a request in Eastern north america? That's the only thing that would explain why it's on the east coast.
77 replies