Hacker News new | past | comments | ask | show | jobs | submit login
Cloudflare Workers Now Even More Unbound: 15 Minutes, 100 Scripts, and No Egress (cloudflare.com)
61 points by samwillis on Nov 18, 2021 | hide | past | favorite | 9 comments



The title (as of this writing) unfortunately drops the word "Fees", as in "No Egress Fees" which dramatically changes its meaning.


Updated! Thanks for the note


They still exclude serving video file though, so not much improvement if you need VOD, live streaming, video conferencing, you'll still need to use their premium services such as Cloudflare Stream (which is 1080p30 max without special treatment)...

"You may use Cloudflare Pages and Workers (whether in conjunction with a storage offering such as Cloudflare Workers KV and Durable Objects or not) to serve HTML content as well as non-HTML content (e.g., image files, audio files) other than video files" - https://www.cloudflare.com/supplemental-terms/


Awesome! I have some questions about the way usage works. I'm wondering if there's a point where efficient, short lived executions are more cost effective as Unbound rather than the bundled Workers now. The docs [1] say:

> Cloudflare will bill for duration charges based on the higher of your wall time or CPU time, with a multiple applied to the CPU time to account for the processing power allotted to your script.

Does anyone know how the CPU time is calculated? What's the "multiple"?

Are there any minimums in terms of execution time? I remember when Workers Unbound was announced I didn't see any mention of minimums anywhere, but other provides have them. For example, Azure [2]:

> The minimum execution time and memory for a single function execution is 100 ms and 128 mb respectively.

I remember thinking the examples in the original announcement assumed no minimums. Even if there's a 100ms minimum, are short lived executions that don't do any waiting on I/O cheaper as Unbound Workers now?

    # Bundled Cost
    $0.50 / 1000000 = 0.0000005 per execution

    # Unbound Per GB-s Cost
    $0.15 / 1000000 = $0.00000015 fixed cost per execution
    $12.50 / 1000000GB-s = $0.0000125 per GB-s (duration cost)

    # 100ms Unbound Cost
    .1s * .125GB = 0.0125 GB-s per execution
    $0.00000015 fixed cost
    $0.0000125 per GB-s * 0.0125 GB-s = $0.00000015625 duration cost
    $0.00000015 fixed + $0.00000015625 duration = $0.00000030625 total cost
Assuming I calculated that right, it's $0.30 per million for 100ms of execution vs $0.50 per million for a normal Worker. There's wall time vs CPU time, but that's a pretty huge discount for short lived executions, right? Am I way off on something? It seems too good to be true. Lol.

1. https://developers.cloudflare.com/workers/platform/pricing#w...

2. https://azure.microsoft.com/en-ca/pricing/details/functions/


We don't have any 100ms minimums we enforce. We'll charge you on the overall use for the whole month, less any included usage for each model.

For some use cases, Bundled makes sense, for others, Unbound makes sense. Again, flexible + affordable is what we're after as we mention in that blog post!


The included amounts in your monthly fee need to be priced in to get an appropriate estimate. I would compute your monthly cost for a certain number of requests rather than trying to multiple a per request number because none of the slopes intercept at 0. At 1 million requests per month, you'll likely be paying $5 on either plan since that's below the baked-in thresholds.

I wouldn't really compare the pricing because they're different use cases.

* Bundled workers can't do 100ms of compute per request. They're limited to a max of 50ms.

* Unbound scripts can use as much or as little compute as you want per request up to a maximum wall time of 30s.

* Cron triggers can use up to 15 minutes of wall time per invocation (but can't handle requests).

If you can do all I/O & CPU within 50ms, then unbundled might theoretically be cheaper still but that's just on my coarse napkin math. It's hard to correctly model how many Workers you'll end up needing during the month which provides large error bars (e.g if you get 100 requests per second across the globe, the cost will be very different than if you got 100 rps from just 1 machine for the month).

The option to pick is the one that satisfies the shape of the problem you are using. Predicting the price you'll end up paying is a bit hard to estimate correctly vs just seeing what your bill ends up being.


So I can serve video on demand with no bandwidth charges?


The terms os service is still in place:

2.8 Limitation on Serving Non-HTML Content The Services are offered primarily as a platform to cache and serve web pages and websites. Unless explicitly included as part of a Paid Service purchased by you, you agree to use the Services solely for the purpose of (i) serving web pages as viewed through a web browser or other functionally equivalent applications, including rendering Hypertext Markup Language (HTML) or other functional equivalents, and (ii) serving web APIs subject to the restrictions set forth in this Section 2.8. Use of the Services for serving video or a disproportionate percentage of pictures, audio files, or other non-HTML content is prohibited, unless purchased separately as part of a Paid Service or expressly allowed under our Supplemental Terms for a specific Service. If we determine you have breached this Section 2.8, we may immediately suspend or restrict your use of the Services, or limit End User access to certain of your resources through the Services.

But realistic we can serve a lot of content (any content) before trigger any problem, that includes video. I have a one App that does several GB per month (including images/video) on Free plan, and other one using few TB/month on Pro Plan... I will probably upgrade to the business plan after when i get close the 1PB, but no one ask me too.

My experience says that no one will contact you about any egress if you are not trying to implement any file host site, youtube-like VOD service, etc.


Sounds great.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: