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

    X1Aaron

    03/31/2021, 11:40 PM
    Does Cloudflare have a Discord?
  • u

    Unsmart | Tech debt

    03/31/2021, 11:44 PM
    this is the cf discord?
  • u

    Unsmart | Tech debt

    03/31/2021, 11:44 PM
    I mean at least as far as for workers stuff mainly but
  • a

    andrew | 1003

    04/01/2021, 12:01 AM
    @User I have this question too.
  • w

    Wallacy

    04/01/2021, 12:11 AM
    Theres a script to do that using api here: https://developers.cloudflare.com/workers/publish-durable-object.sh
  • m

    meghie

    04/01/2021, 1:24 AM
    I'm excited for web sockets... that opens up so much
  • m

    meghie

    04/01/2021, 1:24 AM
    I cant wait to mess around with that and web assembly this week end
  • j

    jwrcdev

    04/01/2021, 2:20 AM
    Quick question about DO billing, what does "Compute ($ per MM GB-sec)" mean
  • m

    meghie

    04/01/2021, 2:21 AM
    mega millions?
  • j

    jwrcdev

    04/01/2021, 2:22 AM
    Cant say i have ever heard that before haha, thought it would be something like Monthly Million Gigabytes per second or something
  • b

    Bienvenu

    04/01/2021, 2:23 AM
    someone from finance got involved: https://corporatefinanceinstitute.com/resources/knowledge/other/mm-millions/#:~:text=In%20finance%20and%20accounting,equals%201%2C000%2C000%20(one%20million).
  • b

    Bienvenu

    04/01/2021, 2:24 AM
    credit to CF for not listing the prices as 0.0000000000000002 per microsecond - the way that AWS Lambda lists their prices is terrible
  • j

    jwrcdev

    04/01/2021, 2:25 AM
    Ah ty for that @User, its a strange way of writing billing info haha
  • s

    sepbot

    04/01/2021, 3:09 AM
    my money is on idle websocket connections to DO incurring compute costs. so it's really only beneficial if you have multiple connections reading and writing the same data at the same time. which makes sense too because that's when you'll need consistency guarantees.
  • k

    Kat

    04/01/2021, 6:24 AM
    Dumb question.. but how do I delete a DO? I tried running
    wrangler publish --delete-class RateLimiter
    but I get the following error:
    Copy code
    Error: Something went wrong! Status: 400 Bad Request, Details {
      "result": null,
      "success": false,
      "errors": [
        {
          "code": 10061,
          "message": "Cannot create binding for class RateLimiter that does not currently implements durable objects. Did you mean to apply a --new-class migration to it?"
        }
      ],
      "messages": []
    }
  • k

    Kat

    04/01/2021, 6:25 AM
    🤔
  • k

    Kat

    04/01/2021, 6:26 AM
    I'm trying to delete the Worker via the UI... but I can't and it gives the following error:
    Copy code
    script still in use by a durable object namespace (Code: 10064)
  • k

    Kat

    04/01/2021, 6:27 AM
    I don't see any documentation on the Wrangler releases page regarding how to delete DO's
  • j

    jed

    04/01/2021, 6:43 AM
    you can use curl and hit the API directly:
    DELETE https://api.cloudflare.com/client/v4/accounts/${accountId}/workers/durable_objects/namespaces/${namespaceId}
  • k

    Kat

    04/01/2021, 6:49 AM
    Ok, thanks @User 🙂
  • b

    Baronium

    04/01/2021, 12:48 PM
    Is it possible to do write requests in DO, but have read requests with regular workers accessing the same storage? It would be cheaper that way, because of the 4 KB increments 🧐
  • e

    eidam | SuperSaaS

    04/01/2021, 12:51 PM
    Storage read requests also need to go through DO instance, as its not globally distributed (as KV is). What I do is having frequently read data in DO memory, so it does not need to read from storage for all requests.
  • b

    Baronium

    04/01/2021, 12:56 PM
    Makes sense (unfortunately), thanks! Guess I have to get the object size down then. Currently for my use case (with 20 KB per object) DO would be three times more expensive than KV - but I need the consistent storage...
  • e

    eidam | SuperSaaS

    04/01/2021, 12:58 PM
    And how many objects per DO instance are we talking about?
  • j

    jed

    04/01/2021, 1:00 PM
    the frequently read data could also exist in the worker too, so you'd only need to call the DO for cache misses.
  • e

    eidam | SuperSaaS

    04/01/2021, 1:03 PM
    Good point, having them cached in the Worker or Cache API would save some reads indeed
  • j

    jed

    04/01/2021, 1:04 PM
    though i'd worry about hitting memory limits... any idea on this? https://discord.com/channels/595317990191398933/773219397422284820/826984312402477057
  • b

    Baronium

    04/01/2021, 1:04 PM
    In the example of one DO instance per mobile application that handles a "maximum monthly request counter", it could manage thousands of user entries (objects) depending on the app popularity. However, maybe the counter should be in the DO, but the other requests stuff could still be happening in KV. Unfortunately there would be no frequently read data (except the app data itself) for any users
  • w

    Webjocke

    04/01/2021, 1:17 PM
    Hey, does anyone know if every message going through websockets to a Durable Object count against the "Price per request $0.15 / MM"?
  • e

    eidam | SuperSaaS

    04/01/2021, 1:44 PM
    We should get more details on the pricing soon https://discord.com/channels/595317990191398933/773219443911819284/826861514601791559
1...353637...567Latest