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

    Unsmart | Tech debt

    01/29/2023, 6:47 PM
    You just use the same ID
  • t

    Tom Sherman

    01/29/2023, 6:47 PM
    I'm struggling with creating the binding
  • t

    Tom Sherman

    01/29/2023, 6:47 PM
    Wrangler was telling me I need to define the class, but I just wanna invoke the DO not define it
  • u

    Unsmart | Tech debt

    01/29/2023, 6:48 PM
    https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects heres the docs on how to define the bindings
  • t

    Tom Sherman

    01/29/2023, 6:48 PM
    Yeah, I'm trying to bind to a DO implemented in another worker
  • u

    Unsmart | Tech debt

    01/29/2023, 6:48 PM
    You need to specify script_name and environment in addition to the name and class_name
  • t

    Tom Sherman

    01/29/2023, 6:49 PM
    If I specify script_name, it shouts at me that the class name isnt exported from this worker 🤔
  • u

    Unsmart | Tech debt

    01/29/2023, 6:49 PM
    did you specify environment also
  • t

    Tom Sherman

    01/29/2023, 6:50 PM
    Hmmmm I didn't
  • u

    Unsmart | Tech debt

    01/29/2023, 6:50 PM
    right now its always production but eventually a script can have many environments so a script name itself doesnt actually mean anything
  • t

    Tom Sherman

    01/29/2023, 6:59 PM
    That shouldn't be causing my error tho right?
  • i

    Iann

    01/29/2023, 7:52 PM
    I got questions about the pricing: 1. Does reading from cache (from memory) count towards the read units ? 2. Does bulk reading (using
    list(prefix)
    ) count as a single read unit or multiple ?
  • u

    Unsmart | Tech debt

    01/29/2023, 7:53 PM
    Both of those are answered here: Yes, and multiple.
  • d

    DanTheGoodman

    01/30/2023, 1:22 PM
    Whats the limit to how many items I can list from storage? I feel like I remember seeing 100 somewhere but I can't find it
  • h

    HardAtWork

    01/30/2023, 1:49 PM
    The limit is just the memory you have available.
  • d

    DanTheGoodman

    01/30/2023, 1:50 PM
    awesome, thanks!
  • Feedback on api for websocket keepalive messages
    c

    ckoeninger

    01/30/2023, 5:37 PM
    If you use websockets and send application-level keepalive messages we'd like to hear from you. We're working on a way for websockets to respond to keepalives, without having to run code that you provide, so you can avoid associated billing costs. Not running arbitrary code means we're limited to simple relationships between a message and its response. We're currently considering something along the lines of:
    d
    u
    +3
    • 6
    • 96
  • w

    Wallacy

    01/30/2023, 7:05 PM
    As far i know worker worker communications is allowed to origenless worker.
  • s

    Skye

    01/30/2023, 7:07 PM
    They're allowed but there's some weird behaviour - if you want to hit another worker on your account, it's always recommended to use service bindings. They don't travel across the network, so they're faster, and also they can't be blocked by things like the Waf or ratelimit rules, which they otherwise might be if sent over http
  • s

    SZAGLAM

    01/30/2023, 7:09 PM
    Interesting, thank you. What does originless mean?
  • s

    SZAGLAM

    01/30/2023, 7:11 PM
    Oh, interesting. I haven't tried this for a long time. Roughly a year ago, calling another worker in the same zone resulted in an error, and was also discussed on community forums. Let me actually see how it works now
  • w

    Wallacy

    01/30/2023, 7:12 PM
    Sorry, is this case is a worker route without a origen server to act as failback
  • w

    Wallacy

    01/30/2023, 7:12 PM
    https://blog.cloudflare.com/custom-domains-for-workers/
  • s

    SZAGLAM

    01/30/2023, 7:13 PM
    Yes this is for an application built entirely on Cloudflare. There is no origin (though there may be fetch'es to various external services)
  • w

    Wallacy

    01/30/2023, 7:14 PM
    Just to clarify... List uses multi request units, but is entire based on the data size, not on key number. If you list 1000 keys and all fits on 4KiB will be one request unit.
  • u

    Unsmart | Tech debt

    01/30/2023, 7:15 PM
    Yes that is true and why I linked the full answer mine was simply a very short answer
  • w

    Wallacy

    01/30/2023, 7:15 PM
    Sure, but sometimes people are lazy... (myself included sometimes)
  • w

    Wallacy

    01/30/2023, 7:16 PM
    😉
  • s

    SZAGLAM

    01/30/2023, 7:20 PM
    Did this become possible thanks to the `custom_domain`s ?
  • s

    Skye

    01/30/2023, 7:21 PM
    I believe it happened around then
1...486487488...567Latest