https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • c

    Chaika

    02/11/2023, 9:42 PM
    There's nothing native to the Workers platform, but they do have a partnership with mailchannels to let you send out email for free, you don't need a mailchannels acct
  • j

    Jonathan_Nathan

    02/11/2023, 9:43 PM
    ok
  • d

    Dogs

    02/11/2023, 11:24 PM
    Is there any performance difference between the wokers-rs version and typescript one?
  • k

    kian

    02/11/2023, 11:28 PM
    Unless it’s something WASM/Rust excels at it’s on par
  • k

    kian

    02/11/2023, 11:28 PM
    For a “Hello World” it’d probably be slower
  • d

    Dogs

    02/11/2023, 11:37 PM
    Thought so but just wanted to make sure
  • z

    zszszsz

    02/12/2023, 3:35 AM
    How you guys manage
    waitUntil
    in code ? I have lots of
    waitUtil
    calls in lots of functions so that I can respond quicker, but they are messing up my code.
  • k

    kian

    02/12/2023, 3:37 AM
    I don’t personally have any issue with having them here & there as necessary - is it just the readability you’re concerned with?
  • z

    zszszsz

    02/12/2023, 4:04 AM
    Yes it is readability
  • z

    zszszsz

    02/12/2023, 4:05 AM
    Hmm and parameter passing. I have to pass the context all around to use that waitUntil
  • d

    dave

    02/12/2023, 6:43 AM
    If I want to schedule a POST request to happen in like 12 hours, what should I use?
  • d

    dave

    02/12/2023, 6:44 AM
    Aren’t Durable Objects only good for up to 30 seconds?
  • d

    Deleted User

    02/12/2023, 6:48 AM
    You can use DO Alarms and use setAlarm
  • d

    Deleted User

    02/12/2023, 6:48 AM
    for anywhere in the future
  • d

    dave

    02/12/2023, 6:48 AM
    For context, I’m trying to allow my mail API to schedule email sends in the future.
  • d

    dave

    02/12/2023, 6:48 AM
    Like even a week in the future?
  • d

    Deleted User

    02/12/2023, 6:48 AM
    yes
  • d

    Deleted User

    02/12/2023, 6:49 AM
    ive used it for months into the future as well
  • d

    Deleted User

    02/12/2023, 6:49 AM
    they dont incur duration costs either
  • d

    dave

    02/12/2023, 6:49 AM
    Huh interesting, so just storage costs?
  • d

    Deleted User

    02/12/2023, 6:55 AM
    - Regular duration costs only during execution but not while waiting 1 week, or 1 year - Your mail API would write once to storage and once to set the alarm, then an extra request when the time comes to invoke the alarm & another to read storage - The alarm gets deleted once ran but you would need to manually delete the storage for whatever mail you have stored
  • d

    Deleted User

    02/12/2023, 6:56 AM
    It was a little unclear when I was reading through the docs a while back so thought I'd share
  • d

    Deleted User

    02/12/2023, 6:58 AM
    alarms also retry automatically in different places if one location fails which is really cool
  • s

    sirhype

    02/12/2023, 8:29 AM
    I come with another question about the appropriate tech to use for something I plan on building. Currently I'm building workers for an API that is using Planetscale as a DB, as well as slightly using KV for some smaller purpose. I'm going to be adding a worker that collects data from an API and caches it, then will fetch from that cached version for requests to the API. (For context, the data is leaderboard data that'll be updated every ~2-3ish minutes or so. But I don't want to make a request to the API every time) Any recommendations for how to handle this most cost effectively? Would it make sense to throw the leaderboard data in KV? Or just put it in my database? The leaderboard data will include multiple seasons, only the latest season actually having any changes.
  • s

    sirhype

    02/12/2023, 8:40 AM
    or can I use the Cloudflare cache system somehow for this 🤔
  • s

    sirhype

    02/12/2023, 8:55 AM
    LOL I just asked ChatGPT and it gave me a solid answer
  • z

    zszszsz

    02/12/2023, 9:13 AM
    You literally have a "Cache API" for free (of money)
  • c

    Cook

    02/12/2023, 10:01 AM
    hey friends - is there any downside/performance ramifications (even just short-term hiccups) to switching to "workers unbound" pricing instead of the standard workers bundle?
  • c

    Cook

    02/12/2023, 10:01 AM
    did some quick maffs and it seems a bit cheaper for our use case. wondering if there's any possible reason not to switch
  • s

    Skye

    02/12/2023, 10:03 AM
    It'll be cheaper whenever you get at least 10 million requests per month, and your average request processing time is <225 milliseconds
1...226322642265...2509Latest