https://discord.cloudflare.com logo
Join Discord
Powered by
# functions
  • j

    James

    11/20/2022, 8:20 PM
    But honestly if you're talking <100k per month, you're probably not gonna come close to 400k GB-s unless every invocation of your worker runs for over 30 seconds
  • j

    James

    11/20/2022, 8:20 PM
    (very quick napkin math, could be off)
  • s

    salutalice

    11/20/2022, 8:21 PM
    I don't understand GB-s 😵
  • j

    James

    11/20/2022, 8:22 PM
    Yeah... it's a very confusing pricing model - I completely agree. To simplify, assume your worker is always using 128MB of memory. If it runs for 10 seconds, it's consumed 1280MB of memory, or about 1.3GB-s.
  • j

    James

    11/20/2022, 8:22 PM
    There's a lot more to it than that, and https://developers.cloudflare.com/workers/platform/pricing/#workers has more details, and https://developers.cloudflare.com/workers/platform/pricing/#workers-unbound-billing-examples has some examples
  • j

    James

    11/20/2022, 8:22 PM
    But from what I've heard, you're not gonna have issues. Run it for a while, keep an eye on your usage.
  • i

    i40west

    11/20/2022, 8:23 PM
    Yeah with that low usage I don't think you'll ever get charged extra at all
  • z

    zsmooth

    11/20/2022, 8:24 PM
    I agree, sounds like even with js-bcrypt you’ll probably stay in free-tier territory. Give it a try.
  • z

    zsmooth

    11/20/2022, 8:25 PM
    (But you still have to switch to the Paid plan and use Unbound to get the extra CPU time)
  • i

    i40west

    11/20/2022, 8:26 PM
    I have a Worker that uses a lot of CPU but not a lot of requests, and it's not even close to charging money
  • i

    i40west

    11/20/2022, 8:27 PM
    you get a lot with the base level
  • i

    i40west

    11/20/2022, 8:27 PM
  • i

    i40west

    11/20/2022, 8:27 PM
    It's basically nothing
  • s

    salutalice

    11/20/2022, 8:27 PM
    thank you all for your help
  • s

    salutalice

    11/20/2022, 8:27 PM
  • s

    salutalice

    11/20/2022, 8:27 PM
    always lovely to show up here and get nice responses
  • i

    i40west

    11/20/2022, 8:42 PM
    [pages:wrn] Worker's uncompressed size exceeds the 1MiB limit! Note that your worker will be compressed during upload so you may still be able to deploy it.
  • i

    i40west

    11/20/2022, 8:42 PM
    I thought that got raised to 5Mb?
  • s

    Skye

    11/20/2022, 8:43 PM
    Not sure if it's been raised in the pages service or if that's just an old message
  • z

    zsmooth

    11/20/2022, 8:43 PM
    Probably wrangler needing an update
  • w

    Walshy | Pages

    11/20/2022, 8:46 PM
    we need to update message
  • c

    Cayter

    11/21/2022, 7:39 AM
    is Cloudflare Pages with functions buggy? I bound a KV to a function in Cloudflare Pages for testing and deleted it right after, but now my subsequent deployments throwing
    Error: Failed to publish your Function. Got error: No KV namespace found with ID 25c168838a2e475fb3e1b20d09b9af77
  • j

    jojov

    11/21/2022, 8:44 AM
    Good morning 😀 I had a question about pages with functions, is anyone available to answer? thank you!
  • h

    HardAtWork

    11/21/2022, 8:45 AM
    Sure, what's the question?
  • j

    jojov

    11/21/2022, 8:46 AM
    Can you use ESI (edge side includes) with pages with functions? At the moment we are going to use a worker (essentially this post here https://blog.cloudflare.com/edge-side-includes-with-cloudflare-workers/) but thought I would see if pages with functions might be better?
  • j

    jojov

    11/21/2022, 8:47 AM
    more info: we want to embed a script from s3 bucket using clouldflare worker and ESI into the body of our page in our app.
  • h

    HardAtWork

    11/21/2022, 8:48 AM
    You could inject it with https://developers.cloudflare.com/workers/runtime-apis/html-rewriter?
  • j

    jojov

    11/21/2022, 8:50 AM
    does this then mean we don't have to use Edge side includes?
  • h

    HardAtWork

    11/21/2022, 8:51 AM
    I mean, you can write them out like that, but if all you want to do is inject a script at runtime, you don't need it. Or, if it is for something like analytics, maybe try https://www.cloudflare.com/products/zaraz/ ?
  • j

    jojov

    11/21/2022, 8:52 AM
    I think this htmlrewriter might be good, thank you I'll try it out 🙂
    • 1
    • 1
1...308309310...392Latest