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

    Skye

    04/14/2022, 3:49 PM
    👍
  • g

    Greg Brimble | Cloudflare Pages

    04/14/2022, 3:55 PM
    And I got this backwards as well. We evaluate top-down for modules and bottom-up for middleware.
  • p

    Ponjimon

    04/14/2022, 11:35 PM
    Hi, I made a basic function that allows to connect via websocket but I'm actually not sure how billing is handled in this case. Where can I find out what costs I can expects for this? The only thing I could really find was this: https://blog.cloudflare.com/introducing-websockets-in-workers and it doesn't actually say what the costs are nor does it apply to CF Pages Functions
  • k

    kian

    04/14/2022, 11:36 PM
    There is no cost model in Functions at the moment since it's still in beta - the only limit is the 100,000 requests per day.
  • k

    kian

    04/14/2022, 11:36 PM
    Once Functions are GA, billing will be similar to Unbound Workers
  • i

    Isaac McFadyen | YYZ01

    04/14/2022, 11:36 PM
    But eventually once Functions billing comes out it will be pricing similar to a Worker.
  • i

    Isaac McFadyen | YYZ01

    04/14/2022, 11:36 PM
    And Workers bill for the entire time the socket is open in duration.
  • i

    Isaac McFadyen | YYZ01

    04/14/2022, 11:36 PM
    So if the socket is open 30 seconds you will be billed 7.5GB-seconds of compute time.
  • k

    KZorro

    04/15/2022, 3:26 AM
    Ok new question. I have Cloudflare access in front of my application. Any good way to mock it with miniflare?
  • h

    HardAtWork

    04/15/2022, 4:39 AM
    Depending on what kind of authentication you are using, you might be able to use
    miniflare
    to simulate Access with a Worker, but it would take some work.
  • m

    MrBBot

    04/15/2022, 10:52 AM
    Not too familiar with Cloudflare Access, how do you usually check the "logged in user" in the worker? Is it a property on the incoming
    cf
    object or something?
  • s

    Seb

    04/15/2022, 3:05 PM
    is there an estimate as to when Functions will go out of beta? the 100K invocations limit is a bummer having to ask for increases makes it out of reach for me, needs to scale automatically
  • k

    kavinplays

    04/15/2022, 3:07 PM
    if you have more traffic than that already, you could just submit a request now
  • s

    Seb

    04/15/2022, 3:08 PM
    no, I want billing in place
  • k

    kavinplays

    04/15/2022, 3:09 PM
    well you don't want to use it in beta right?
  • k

    kavinplays

    04/15/2022, 3:10 PM
    i would say there's a decent amount of time till it goes into ga
  • k

    kavinplays

    04/15/2022, 3:10 PM
    the pricing would be, or should be, similar to workers pricing
  • k

    kavinplays

    04/15/2022, 3:10 PM
    which is visible rn
  • s

    Seb

    04/15/2022, 3:10 PM
    I'm okay with beta, as long as I can pay for it, and it scales automatically
  • s

    Seb

    04/15/2022, 3:11 PM
    ohhh, I see maybe I should look at the workers platform then which is already out
  • k

    kavinplays

    04/15/2022, 3:11 PM
    it's the same platform, just functions are more tightly integrated with pages
  • s

    Seb

    04/15/2022, 3:12 PM
    yeah, I love how functions can be deployed side by side with static assets, and the assets not needing to go into KV
  • k

    kavinplays

    04/15/2022, 3:12 PM
    (they do go to KV, just that you don't need to manage it yourself)
  • g

    gerrcass

    04/15/2022, 10:07 PM
    Hey guys! Function beta means, for example, that it can be stop working at any time? for simple use cases that works just fine in Workers one might well expect them to work as well in Functions? Im planning to deploy in Pages and would like to have workers code in the same place. What would be recommended? (simple app but in production)
  • w

    Walshy | Pages

    04/15/2022, 10:09 PM
    it won't stop working
  • i

    Isaac McFadyen | YYZ01

    04/15/2022, 10:09 PM
    Beta means they should work (and in fact I've never seen them go down). There are no SLAs of course 😅 and you're limited to 100k requests per day unless you request an increase, but they're production-ready (I use them in prod).
  • w

    Walshy | Pages

    04/15/2022, 10:09 PM
    Just won't have billing and a few features yet
  • g

    gerrcass

    04/15/2022, 10:19 PM
    Thank you 👍 .... im going to use Functions... nice syntax by the way.. regards
  • s

    Seb

    04/16/2022, 7:02 PM
    thanks for your clarifications btw, @kavinplays! sorry, I forgot to thank you :' )
  • j

    James

    04/16/2022, 10:11 PM
    Playing with Pages Functions. If I have a simple
    onRequestGet
    on a route that hits the
    index.html
    , but I then call
    await next()
    to retrieve say
    test.html
    , if I then return the result of that
    next
    call, I appear to be 301d to
    /test
    . I think I'm missing something for how this works - I'm essentially trying to get a different
    html
    file if there's a particular query parameter, but I keep getting weird 301s, at least with
    wrangler@beta
    0.0.26
1...121122123...392Latest