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

    Unsmart | Tech debt

    05/12/2023, 9:57 PM
    Well no clue what the limit might be, how many DOs do you create per second?
  • a

    Advany

    05/12/2023, 10:01 PM
    Thanks a lot! So it will be a service to my saas customers to setup sequences for their users. What would be a better way? I want it to work like workers where there is no limit to scaling it.
  • h

    HardAtWork

    05/12/2023, 10:05 PM
    Around 8?
  • h

    HardAtWork

    05/12/2023, 10:05 PM
    That actually sounds kind of low…
  • u

    Unsmart | Tech debt

    05/12/2023, 10:05 PM
    If DOs stopped creating after 8rps that would be very bad 😅
  • h

    HardAtWork

    05/12/2023, 10:06 PM
    And I just realized that I broke WDL. Again
  • h

    HardAtWork

    05/12/2023, 10:06 PM
    In bursts, maybe. But I’m assuming it isn’t supposed to run at that sustained
  • h

    HardAtWork

    05/12/2023, 10:07 PM
    About 27k an hour
  • u

    Unsmart | Tech debt

    05/12/2023, 10:07 PM
    I was hoping to be able to do 1 request = 1 DO as a sort of express step functions like AWS has which allows 6,000 RPS 😅
  • u

    Unsmart | Tech debt

    05/12/2023, 10:07 PM
    Dont need anywhere near 6000 rps myself but
  • h

    HardAtWork

    05/12/2023, 10:09 PM
    You know, you just have me the idea to try to push DO creation to its limits
  • u

    Unsmart | Tech debt

    05/12/2023, 10:10 PM
    We all know who to blame when the DO incident starts
  • h

    HardAtWork

    05/12/2023, 10:10 PM
    Wonder what would happen if I set WDL to update every second…
  • h

    HardAtWork

    05/12/2023, 10:10 PM
    Yeah, you lol /s
  • c

    ckoeninger

    05/12/2023, 10:25 PM
    I would maybe suggest doing a DO per customer (either yours or theirs) rather than per email
  • c

    ckoeninger

    05/12/2023, 10:26 PM
    and if a given customer had multiple scheduled emails, use a different storage key for each, starting with time they needed to be sent
  • h

    HardAtWork

    05/12/2023, 10:26 PM
    Hey @ckoeninger, just want to check with you, would 450 DO creations per second break anything?
  • h

    HardAtWork

    05/12/2023, 10:27 PM
    Wanna test something, but also don’t want to actually break something
  • c

    ckoeninger

    05/12/2023, 10:28 PM
    I'm not sure off the top of my head at what point we start throwing that "limit on how quickly you create new objects"
  • c

    ckoeninger

    05/12/2023, 10:28 PM
    I certainly wouldn't suggest trying to load test it on a friday evening when my team is trying to verify whether a feature everyone wants is ready to release 😉
  • h

    HardAtWork

    05/12/2023, 10:29 PM
    I’ll wait for Monday then 😜
  • a

    Advany

    05/12/2023, 10:37 PM
    Thanks. Will do! Is there a way to calculate what scheduling and triggering one email would cost from a DO perspective?
  • d

    Dani Foldi

    05/12/2023, 10:38 PM
    👀 we do love 🥱 features
  • c

    ckoeninger

    05/12/2023, 10:42 PM
    it depends somewhat on how much storage you're using for each and how long it stays undeleted, as well as how long the request / alarm itself takes to run
  • c

    ckoeninger

    05/12/2023, 10:46 PM
    but if you want to do a back of the envelope through each category in https://developers.cloudflare.com/workers/platform/pricing/#durable-objects you'd have 2 requests for the initial setting of the email (worker and DO), a request for the alarm activation, whatever duration associated with both of those, 2 storage writes, a storage read, and a storage delete, and however long you stored the data
  • a

    Advany

    05/12/2023, 10:50 PM
    Awesome! That doesnt sound very expensive!
  • a

    Advany

    05/12/2023, 10:53 PM
    Why two storage writes. Just curious haha
  • a

    Advany

    05/12/2023, 10:54 PM
    The set alarm.. just understood it
  • c

    charl

    05/13/2023, 7:31 AM
    I’m building a chatbot and looking at dos for storing some user context, will the do and state live indefinitely?
  • h

    HardAtWork

    05/13/2023, 7:41 AM
    State will, the DO will not
1...553554555...567Latest