https://discord.cloudflare.com logo
Join Discord
Powered by
# durable-objects
  • u

    Unsmart | Tech debt

    01/05/2023, 4:32 AM
    Yeah DOs bill on wall time not CPU time. Polling would really be the only way to reduce it.
  • u

    Unsmart | Tech debt

    01/05/2023, 4:33 AM
    (unbound workers are also billed on wall time not CPU time. And bundled workers aren't billed for wall or CPU time just have limits on both)
  • f

    florian

    01/05/2023, 4:56 AM
    Ah, I see, thank you
  • k

    Kevin W - Itty

    01/05/2023, 7:56 PM
    To answer my own question for others: - yes, a Worker requesting a socket response from a DO must follow the same protocol as an end client/original request, including a GET method, and "upgrade" header. Omit either of those, and you'll throw/crash. - itty-durable is being modified (transparently) to handle all that in a seamless manner.
    • 1
    • 1
  • d

    dpeek

    01/06/2023, 2:51 AM
    Hi there, I'm having an issue with DurableObject execution performance that is causing some serious issues in a production environment, I've opened a support request but asking here incase there is a workaround.
    c
    • 2
    • 21
  • a

    aranchelk

    01/06/2023, 4:01 AM
    Does anyone have experience establishing websockets between two durable objects? Is it even possible? When I add the upgrade header per the docs to have a DO act as a websocket client, using that same code that's working for normal requests, I get an error that seems to suggest the fetch request actually resulted in a request to reach the dummy url in my Request objects, not the DO as it normally would: "Fetch API cannot load: example.com". On the other side (the DO acting as a server) I don't see evidence that the upgrade socket request ever came through.
  • c

    ckoeninger

    01/06/2023, 3:13 PM
    @dpeek can you DM me a link to your support request?
  • d

    DanTheGoodman

    01/06/2023, 4:11 PM
    Hey when you run a worker that is bound to a DO, will that worker always run from within a datacenter that support durable objects? Or does that worker run anywhere and ALWAYS goes to another DC for calling a DO?
  • u

    Unsmart | Tech debt

    01/06/2023, 4:16 PM
    DOs are their own workers separate from the main worker script. So the main worker will run anywhere and the spawned DOs will be the closest data center to the execution creating an instance of the DO class. And whenever you call an existing DO instance it will look up where that instance was spawned and call it
  • d

    DanTheGoodman

    01/06/2023, 5:13 PM
    thanks, is there any way you could pin them together so the worker and the DO could run very close together?
  • u

    Unsmart | Tech debt

    01/06/2023, 5:14 PM
    No you cannot. If the user who created the DO is the only one using it though it should be as close as possible
  • d

    DanTheGoodman

    01/06/2023, 5:15 PM
    Got it, thanks. I'm trying to use WfP with DOs in a way that I can allow people run write their own DOs effectively, but since WfP can't actually define a DO my closest shot was having them run basically together so the fetch call was nearly no latency
  • a

    aranchelk

    01/06/2023, 7:03 PM
    I posted my question at kind of an odd hour, anyone have any ideas on websockets between two DOs?
  • s

    Stefatorus

    01/07/2023, 2:47 PM
    Pages 2.0
  • s

    Skye

    01/07/2023, 3:04 PM
    It might be an idea to try and have a chat with @tanushree about your use case?
  • d

    DanTheGoodman

    01/07/2023, 3:05 PM
    Would love to. @tanushree let me know how best to proceed
  • b

    Burrito

    01/08/2023, 9:02 AM
    If I want to store 10 MB of data using DO's storage by splitting it into multiple values, that would count as 2560 read/write units?
  • d

    DanTheGoodman

    01/08/2023, 2:10 PM
    If that’s how many you divide them into, yeah
  • d

    DanTheGoodman

    01/08/2023, 2:11 PM
    Are durable object transactions isolated to the time they transaction was started? And are they serializable in that any changes to keys relevant to the tx will abort the tx on commit? Or is it just an atomicity tool?
  • b

    brett

    01/09/2023, 5:17 PM
    Yeah, you could also use KV or R2
  • b

    Burrito

    01/10/2023, 4:05 AM
    Yeah from a cost perspective using DO storage for "large" (10 MB isn't even that much tbh) feels pretty prohibiting
  • b

    Burrito

    01/10/2023, 4:06 AM
    What's the speed of DO writing to R2? Since DO is charged for wall clock time.
  • e

    eidam | SuperSaaS

    01/10/2023, 11:40 PM
    Is there something known going on with Durable Objects / Alarms? Some of my DOs are not triggering their alarms.
  • e

    eidam | SuperSaaS

    01/10/2023, 11:50 PM
    Seems to be a very similar issue to the previous one, alarm is still set to the past and I cannot set a new time.
  • e

    eidam | SuperSaaS

    01/10/2023, 11:52 PM
    I can DM Durable Object ID / cf account id if anyone is around to take a look
  • e

    eidam | SuperSaaS

    01/11/2023, 9:36 AM
    One of the DO alarms was stuck for 7 hours, now it’s back. There might be other stuck ones I suppose, happy to help to debug this.
  • b

    brett

    01/11/2023, 4:08 PM
    Thanks for the report, the team is debugging it now, don't think we need any more info yet
  • a

    Alaanor

    01/11/2023, 8:10 PM
    Im totally new to durable object and so I dont' know their black magic yet 😄 I was wondering whatever they would be a good use case for settings in an app to be sync across multiple device in a realtime manner ? I'm seeing more a realtime chat/game example but typically in my case I'm doing a webextension and webapp (be on the same device or not), I'd like to have those two thing synced in terms of settings. I believe a firebase realtime db would totally be capable of doing that. What about the durable object ?
  • b

    brett

    01/11/2023, 10:40 PM
    Like having a websocket from each client connected to the DO to share changes? That sounds like a good use to me. Currently, an open WS keeps a DO "active" and thus we bill for it, so this could be more expensive than you'd like. There are changes coming to help there, though. No timeline or details yet 🙂
  • a

    Alaanor

    01/11/2023, 10:42 PM
    Yeah that's kinda the sad part. I wouldn't have a lot of activity but long period of listening
1...474475476...567Latest