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

    Unsmart | Tech debt

    03/31/2021, 2:07 PM
    Yikes, calling out amazon for the data transfer costs then matching it for DO Not a good look at all šŸ˜•
  • w

    wilbo007

    03/31/2021, 2:11 PM
    is there a way kill an existing object
  • t

    tp

    03/31/2021, 2:22 PM
    Really frightned with this new pricing. Im really curious whether if you leave a websocket connected but no messages are sent for say 1 hour, youre charged for 1 hour of compute?
  • j

    jed

    03/31/2021, 2:46 PM
    i’m sure we’ll get clarification from the team, but to calibrate, an idle websocket on AWS is about a penny a month ($0.25 per million connection minutes, per https://aws.amazon.com/api-gateway/pricing/)
  • p

    PhilipA

    03/31/2021, 2:51 PM
    Is that an apples to apples comparison though? A DO could be conceptualised as a hybrid API Gateway/Lambda (obviously it is not as simple as that but I'm sure you get the point that a long lived lambda connection would not be the same cost...)
  • j

    jed

    03/31/2021, 2:55 PM
    the point is that an idle websocket does not incur compute costs in AWS, since the lifecycle of the lambda is detached from the lifecycle of the websocket.
  • j

    jed

    03/31/2021, 3:23 PM
    also of note if i understand correctly is that durable objects are charging by wall time a la unbound, not by CPU time a la bundled.
  • a

    AlexRobinson

    03/31/2021, 4:52 PM
    The pricing questions are gonna need a responseĀ from our product manager, since I'm not sure of all the details, but he's unfortunately out today. Hopefully we'll have clarifications for you all soon.
  • a

    AlexRobinson

    03/31/2021, 4:52 PM
    Just to clarify, we confirmed in DMs that this was due to CPU exceeded errors. A websocket request currently just gets the one 50ms CPU budget for its entire lifetime, so if it's used regularly it'll run out after a while and get disconnected due to exceeding the limit. This is not at all the desired behavior and we'll work on fixing it soon, but in the meantime reconnecting does get you a new CPU budget
  • a

    AlexRobinson

    03/31/2021, 4:53 PM
    They're in a couple dozen PoPs spread around the world at the moment, but we plan to continue adding more over time.
  • a

    AlexRobinson

    03/31/2021, 4:53 PM
    No rust examples yet. If you get one working it'd be great if you could share it
  • a

    AlexRobinson

    03/31/2021, 4:54 PM
    What exactly do you mean? If you stop sending requests to an objcet and disconnect any websockets to it, it'll automatically be stopped by the system. Objects are only kept live in memory so long as they're actively in use
  • w

    wilbo007

    03/31/2021, 4:56 PM
    Oh okay that’s good to know, I was just checking what colo they were being deployed to. How long until they will be automatically stopped by the system when there’s no websocket? Seconds, Minutes or hours?
  • a

    AlexRobinson

    03/31/2021, 4:57 PM
    Generally around a minute, although there's no specific guarantee there
  • w

    wilbo007

    03/31/2021, 5:04 PM
    Thanks šŸ‘
  • j

    john.spurlock

    03/31/2021, 5:18 PM
    anyone have an example of how to upload a Durable Object class script in a module file by itself? i.e. not mixed in with the calling worker.
  • j

    john.spurlock

    03/31/2021, 5:19 PM
    I'm using just the api, and I'm almost there, but in the end it forces me to specify a "main_module" in metadata, and then if I do, it says: "The uploaded script has no registered event handlers.", which of course it doesn't
  • m

    msutkowski

    03/31/2021, 5:22 PM
    are there any typescript examples for getting types in for
    WebSocketPair
    ? any help is appreciated šŸ™‚ - is this the thing? https://github.com/cloudflare/workers-types
  • m

    matt

    03/31/2021, 5:35 PM
    @User right now we still require an event handler with all uploads, even if you're not going to use it. We hope to remove this restriction soon šŸ™‚
  • t

    Tim | Social Blade

    03/31/2021, 5:36 PM
    Congrats on the open beta! šŸ˜„
  • c

    Ceru Ā©

    03/31/2021, 5:42 PM
    has anyone benchmarked DO yet?
  • j

    john.spurlock

    03/31/2021, 5:48 PM
    Thanks! got it working - but yea would love to be able to remove this unneeded fetch handler, ideally in this scenario the worker script (containing just the DO) should not really have a public route, right?
  • m

    matt

    03/31/2021, 5:49 PM
    Usually, but you may want a public route w/ E.g. access or some sort of access control in front of it for debugging
  • j

    john.spurlock

    03/31/2021, 5:54 PM
    I see how that would be useful, once I'm past this hello world example, but what are the bandwidth charge implications? i.e. would I start paying the bandwidth charge for all incoming calls to that DO fetch handler? vs a normal worker
  • d

    davidbarratt

    03/31/2021, 6:01 PM
    when DO is out of beta, will any amount be included in the Workers Bundled plan?
  • d

    dabeeeenster

    03/31/2021, 6:27 PM
    Congrats on the beta launch! I've been running some latency tests as part of the private beta and wanted to check these latency times look right? I'm just grabbing a single counter item from the data store:
    Copy code
    time_namelookup:  0.001117s
            time_connect:  0.019944s
         time_appconnect:  0.068345s
        time_pretransfer:  0.068393s
           time_redirect:  0.000000s
      time_starttransfer:  0.123801s
                         ----------
              time_total:  0.123859s
    These times seem high?
  • v

    vans163

    03/31/2021, 8:54 PM
    its only possible to upload DOs using wrangler now right?
  • v

    vans163

    03/31/2021, 8:54 PM
    no web gui? like for workers
  • j

    joe

    03/31/2021, 8:56 PM
    Nope, only wrangler right now
  • b

    Bienvenu

    03/31/2021, 10:47 PM
    Does DO data egress pricing apply to transfers out to Bandwidth Alliance members?
1...343536...567Latest