News for hackers. Stuff that matters.
Re:Cloudflare's Disruption by kureikain on Thursday September 30, 2021 @02:36PM (#28709570)
Cloudflare is truly amazing.

They almost compete with everyone now.

DNS: They eat simpledns lunch Pages: They eat Netlify lunch Worker: They eat serverless/lambda as in AWS/GCP lunch R2: They eat AWS Lunch

And finally

Email Forwarding: They eat ... my own lunch (I'm founder of hanami.run an email forwarding service)

That's being said, from a user perspective, if my domain is already on CloudFlare, I can just host everything on it.

Right now, cloudflare workers is pretty great to add some dynamic stuff. And pages is great for static site.

Re:Cloudflare's Disruption by ManWith2Plans on Thursday September 30, 2021 @07:26PM (#28712512)
I've had relatively bad experiences with Cloudflare's DNS solution. Here are a couple of examples of pain-points: 1. You can't set NS records for an Apex domain registered through cloudflare (even at more expensive service tiers). You can delegate management of subdomains with NS records but only if you shell out for an expensive plan $$$. 2. Cloudflare performs cname flattening for cnames by default. This prevents you using cname based dns validation for third parties. One such example is certificates in Amazon Certificate Manager which performs cname lookups. You can disable cname flattening but you have to shell out for a more expensive plan $$$$.
Re:Cloudflare's Disruption by eastdakota on Thursday September 30, 2021 @08:50PM (#28713152)
Thanks for the feedback. I don't think we're intentionally charging to turn off CNAME flattening. May be that we just don't expose that to lower plans because we're worried it'll confuse people. Raised the feedback with the team. In most cases, CNAME flattening is a significant win on performance. But understand when you'd want to do it in some cases.

Will also check on NS delegation. Again, my hunch is that we only charge for it because it's something that less sophisticated users we worry would get themselves in trouble messing with.

Re:Cloudflare's Disruption by donmcronald on Friday October 01, 2021 @12:36AM (#28714598)
> May be that we just don't expose that to lower plans because we're worried it'll confuse people.

It does. IIRC GitLab Pages used to have docs saying to set a CNAME for your domain without warning about doing it on the apex domain. I'm not sure if GitHub Pages was any better either.

It's only confusing the first time you mask your MX records. LMAO.

Re:Cloudflare's Disruption by kureikain on Thursday September 30, 2021 @09:39PM (#28713520)
oh, ic.

To me, my biggest pain points is I cannot set NS record for a sub domain.

My use case is this: I had a certain subdomains where I want to use LetsEncrypt DNS with DNS validation. I don't want to give the whole domain to the auto renewal script. With another DNS provider, AWS Route53 for example, I can easily create another zone for that subdomain say blog.domain.com and set NS record on blog to that zone. Then create an API key with only privileges to manage that sub zone. I cannot do that with CloudFlare though.

Agree on Cname flattening. It cause some issue for my email forward service in the past.

So we have customer use githb page and set CNAME on apex domain. Then they add a MX record for apex domain. CloudFlare UI allow them to do that. But upon resolving won't return MX records for the apex. So my customer aren't able to finish setup. Eventually we have to set the A Record on Apex to an IP.

Re:Cloudflare's Disruption by donmcronald on Friday October 01, 2021 @12:39AM (#28714627)
> You can delegate management of subdomains with NS records but only if you shell out for an expensive plan $$$.

Are you sure? I have a free site where `in.example.com` is delegated to Namecheap's FreeDNS so I can use it for DynDNS on some devices that don't support Cloudflare's newer (fine grained) API tokens.

Re:Cloudflare's Disruption by blibble on Thursday September 30, 2021 @09:15PM (#28713362)
add to that you can't atomically change a zone's DNS records

(I know there's an import but it erases some of the other settings)

$0.99 domain providers mostly get this right

Re:Cloudflare's Disruption by rewma on Thursday September 30, 2021 @02:39PM (#28709595)
> They eat serverless/lambda as in AWS/GCP lunch

Aren't Cloudflare Workers a very specialized kind of lambda that's severely resource constrained and whose runtime is capped at 15ms?

If anything Cloudflare Workers compete with Lambda@edge, but it's very disingenuous to compare them with AWS Lambdas and it's completely absurd to claim they eat anyone's lunch.

Cloudflare Workers's usecase is extremely limited and specialized: run a script comprised of a couple lines of code that do not do much at all right at the edge. We're talking about things like adding a response header. Even then they are immediately killed if pretty much they don't exit immediately.

Re:Cloudflare's Disruption by kondro on Thursday September 30, 2021 @04:02PM (#28710650)
No.

The all-inclusive Lambda workers are limited to 50ms of actual CPU runtime and can execute forever (i.e. hours) for IO bound workloads, as long as you stay below the 50 network requests per execution. And for that they cost $0.50/million, have unlimited in/egress bandwidth and free in-DC caching.

But they also have a more AWS-like pricing option that’s about 20% cheaper and charges per request, per GB-hour (for runtime, not actual CPU usage) and for bandwidth with a maximum runtime of 15 minutes.

They also have Durable Workers which provide you global singleton persistent functions for stateful architecture.

If you haven’t had a look at CF’s serverless stuff for a while, it’s worth a look again.

Re:Cloudflare's Disruption by ryan29 on Thursday September 30, 2021 @07:30PM (#28712541)
> If you haven’t had a look at CF’s serverless stuff for a while, it’s worth a look again.

That's especially true if your workload makes sense for the all-inclusive Workers. I evaluated only the pricing a while back and Cloudflare Workers are far more attractive than anything else in the market IMO.

With AWS and Azure, it's really hard to calculate just how expensive things are going to be. I'd say it borders on impossible without just running your workload for a bit and waiting for the bill.

With Cloudflare Workers, it's dead simple. As long as your Worker runs in <50ms, it costs $0.0000005 per run. I can tie that directly to (page) hit counts and calculate costs with very little effort.

For my own reference point, I ignored the fixed cost per run, which is actually more expensive for Lambda@Edge, ignored the variable cost per run, which actually has minimums for Azure Functions, and calculated the egress cost per byte.

Assuming they use GB and not GiB for egress, it's $.09 / 1,000,000,000 = $0.00000000009 per byte. Now take your Worker cost and divide it by the per-byte egress cost and that's 0.0000005 / 0.00000000009 = 5,555.

That's <6KB of egress for the same price as a Worker run on Cloudflare. Even if AWS and Azure started offering free Lambdas / Functions, it would still be a bad deal if Cloudflare Workers meet your technical needs.

Re:Cloudflare's Disruption by rewma on Friday October 01, 2021 @03:22AM (#28715613)
> With Cloudflare Workers, it's dead simple. As long as your Worker runs in <50ms, it costs $0.0000005 per run.

I'm not sure you're looking at the problem right.

I mean, if you write your AWS Lambda code to do the same thing Cloudflare does to their workers in their Bundled Requests pricing model and automatically kill them if they reach 50ms, you also get a dead simple way to know what you pay per request.

However, Cloudflare also charges per request and per execution time their Unbound requests pricing model, which leads us pretty much to AWS Lambda's pricing model.

https://developers.cloudflare.com/workers/platform/pricing

Re:Cloudflare's Disruption by kondro on Thursday September 30, 2021 @09:46PM (#28713574)
Don't forget AWS CloudWatch for logs.

Cost for log processing is $0.50 per GB and the minimum size of logs (just for the START/END/REPORT lines output by Lambda itself, before you start logging any of your data) is about 260 characters (or 260MB/million == $0.13/million).

Honestly, unless you have gone out of your way to implement something that isn't CloudWatch for logs (and there's almost no documentation on how to do that), its not hard to get an extra 5-10KB ($2.50-$5.00/million to process by CloudWatch) of logs per request.

Like AWS egress charging, CloudWatch Logs can quickly dwarf the cost of using the services themselves.

Re:Cloudflare's Disruption by rewma on Friday October 01, 2021 @03:00AM (#28715492)
> No.

The really are. By Cloudflare's ow docs, Cloudflare workers are just scripts that are designed to be executed before a request hits the cache.

Quite the far cry from what AWS Lambda offers, which is a generic compute platform that handles both long-running batch jobs and handles events, and can be invoked any way that suits your fancy (HTTP request, events from other AWS services, AWS SDK).

At most, Cloudflare workers are comparable with Lambda@edge.

> The all-inclusive Lambda workers are limited to 50ms of actual CPU runtime and can execute forever (i.e. hours) for IO bound workloads, as long as you stay below the 50 network requests per execution.

You are right. According to Cloudflare's docs, Cloudflare Workers are capped at 10ms CPU time on their free tier, but their Bundled Usage Model plan bumps the CPU time limit to 50ms. There's also Cloudflare's Unbound plan which not only charges per request but also adds charges for duration instead of CPU time (i.e., also charges for idling time when waiting for responses) and that's bumped up to 30s.

https://developers.cloudflare.com/workers/platform/limits

> But they also have a more AWS-like pricing option that’s about 20% cheaper and charges per request, per GB-hour (for runtime, not actual CPU usage) and for bandwidth with a maximum runtime of 15 minutes.

No, not really. Cloudflare announced a private beta for their Cloudflare Workers Unbound Cron Triggers a couple of months ago, but that's about it.

https://blog.cloudflare.com/workers-unbound-ga/

https://www.cloudflare.com/workers-unbound-beta/

I'm not sure how familiar you are with AWS Lambdas, but if you check their docs you'll notice that, unlike Cloudflare Workers offering, they are general purpose and can be even invoked from all kinds of events, including directly from HTTP requests. So, neither they are available nor are they comparable to AWS Lambdas. Thus I'm not really sure why you brought up something only made available through a private beta and is very limited in it's capabilities to compare with AWS Lambda, which is production ready for years.

Re:Cloudflare's Disruption by latchkey on Thursday September 30, 2021 @03:49PM (#28710503)
So very limited, but really solve some huge problems.

I run datacenter(s) with thousands of autonomous machines. These machines run a small binary daemon. That daemon needs to check for a new version of itself, which is built/released as a CI push job on github (after all the tests pass).

A super simple CF worker serves as a reverse proxy to the GH API + the download of the binary. For $5/month, I've worked around the GH API limitations, in a massively scalable way.

Re:Cloudflare's Disruption by manquer on Thursday September 30, 2021 @11:50PM (#28714270)
Interesting use case and solution.

Why not use package publishing tool like packagecloud.io (or setting your own private reprepro, dak variation) with unattended-upgrades configured for the repos and frequency you need ? Was the tooling at OS layer not adequate for this kind of setup ?

Re:Cloudflare's Disruption by latchkey on Friday October 01, 2021 @01:51AM (#28715093)
You have a good point. At the end of the day, this is an implementation detail and something that can be easily changed. =)
Re:Cloudflare's Disruption by latchkey on Friday October 01, 2021 @10:46AM (#28719095)
Looking into packagecloud.io pricing, I'd be in the $700/month plan based on transfer alone. $5 -> $700.
Re:Cloudflare's Disruption by manquer on Saturday October 09, 2021 @09:13PM (#28814891)
You are running a DC with thousands of machines, while $700 is not insignificant, it shouldn't be a decision making factor at that size. You could run package manager locally and save on that managed cost if you really wanted to.

As developers we constantly discount the value of our time. Your time in developing/maintaining these scripts is not free.

From an org perspective, to maintain a home grown solution is not free either, inevitably someone would take over this part of your role, they would need skills they otherwise probably won't need to have (making hiring harder/costlier) and they will need more training and also will have to spend time maintaining it.

This is true even if you are the founder of the organization. I thought being a founder where I am going to go so early on built solutions like yours. It turns out that doesn't make any difference The role always changes . As an employee we become older acquire more skills/knowledge/experience and role changes or simply leave the org. As a founder we grow the company and have to hire more people to do what once we did.

Re:Cloudflare's Disruption by latchkey on Saturday October 09, 2021 @09:40PM (#28815023)
I get what you're saying and this isn't my first rodeo. =)

FYI, running it locally would involve buying hardware and maintaining that hardware, at each datacenter (there are multiple). We don't have any server hardware at the data centers.

Re:Cloudflare's Disruption by nly on Thursday September 30, 2021 @09:22PM (#28713411)
You should write this up, it sounds cool
Re:Cloudflare's Disruption by dragonwriter on Thursday September 30, 2021 @02:41PM (#28709624)
Aren't Cloudflare Workers more comparable to AWS Lambda@Edge than regular Lambda?
Re:Cloudflare's Disruption by rewma on Thursday September 30, 2021 @03:39PM (#28710412)
> Aren't Cloudflare Workers more comparable to AWS Lambda@Edge than regular Lambda?

Yes that's my point. Unlike AWS Lambda, the usefulness of Cloudflare Workers is very specialized and narrow, like adding response headers or update a response document.

AWS Lambdas on the other hand can run freely for over 15min, have virtually no limit in how much RAM they can use, and can be pushed as a Docker image with a max size of 10GB.

If that is not enough, AWS Lambdas can be tied together into workflows with AWS step function.

Therefore, for anyone to claim that Cloudflare Workers win over AWS Lambdas, either they have no idea what AWS Lambdas are or have no idea what Cloudflare Workers are.

Re:Cloudflare's Disruption by kureikain on Thursday September 30, 2021 @04:01PM (#28710641)
Here is my use case: I have a static site to process form and referral. It used to run on AWS Lambda. I migrated them to Cloudflare workers. Deployment, code editing etc is much easier.

And no, it's fully act as a standalone app. I define the route to to route a part of traffic to the worker, other parts to our pages app.

For me, it works great and replace my aws lambda usage.

Re:Cloudflare's Disruption by ElFitz on Thursday September 30, 2021 @10:54PM (#28713961)
I have used them as reverse proxies to have re-direct slack messages to the Firebase project (we use one Firebase project per environment).

Also used them to return images from different providers, and resize them, on a single endpoint.

Plus, if you decide to pay a premium (but still often cheaper than lambda), they can run for just as much time.

All that’s actually missing here, for me, is the triggering mechanisms and integrations with services like S3, SNS, DynamoDB, etc.

Re:Cloudflare's Disruption by Thaxll on Thursday September 30, 2021 @05:11PM (#28711359)
Especially since lambdas are tide to the entire AWS ecosystem. It's plugged to cdn / load balancers, s3 ect ... Cloudflare has none of that.
Re:Cloudflare's Disruption by sfeng on Thursday September 30, 2021 @07:16PM (#28712445)
Cloudflare is most commonly seen as a CDN, has a very robust load balancing product, and has a competitor to S3 called R2.
Re:Cloudflare's Disruption by Thaxll on Thursday September 30, 2021 @09:44PM (#28713561)
I never heard people load balancing ec2 instances with Cloudflare.
Re:Cloudflare's Disruption by meah0 on Thursday September 30, 2021 @03:10PM (#28710071)
It feels like a lot of people singing Workers’ praises haven’t really used them in customer-facing scenarios at large scale. They are useful but there’s a lot missing compared to Lambda.
Re:Cloudflare's Disruption by xwdv on Thursday September 30, 2021 @07:20PM (#28712468)
Feel free to list examples.
Re:Cloudflare's Disruption by sleepy_keita on Thursday September 30, 2021 @08:11PM (#28712839)
I really like the promise of Pages but Netlify is easier to use at the moment. (I have major performance problems with their CDN though, so we're sort of half on CF Pages and half on Netlify)
Re:Cloudflare's Disruption by superasn on Friday October 01, 2021 @04:51AM (#28716105)
Wow never knew cloudflare did this. Now if they only started offering a way to forward emails to a URL that would be truly amazing.

Right now I have to use Amazon SES + SNS for this but seeing how cloudflare already has workers, this would be a killer feature for a lot of companies including mine.

Re:Cloudflare's Disruption by joshxyz on Saturday October 02, 2021 @03:10AM (#28726640)
For me its their achilles heel. Tried sining up earlier this year, the UI is a clusterfuck of products and services, I spent more time on google to find the right pages and the right description, comparison, and documentation of their products
Re:Cloudflare's Disruption by ajb on Thursday September 30, 2021 @05:35PM (#28711610)
Seems like the main misding part is a DB. Wonder what they're doing about that.
Re:Cloudflare's Disruption by eastdakota on Thursday September 30, 2021 @09:28PM (#28713443)
Building a DB. Several different flavors, actually. But one needs to be a distributed, multi-tenant, ACID compliant SQL database. We also need to have hooks to allow you to connect to any third party database that makes sense for your application. So… stay tuned.
Re:Cloudflare's Disruption by sroussey on Friday October 01, 2021 @01:31PM (#28721280)
Awesome!

Also… auth

Re:Cloudflare's Disruption by gukov on Thursday September 30, 2021 @07:51PM (#28712691)
On hanami.run:

> Never lost your emails.

Should be "Never lose your emails."

Re:Cloudflare's Disruption by goodpoint on Thursday September 30, 2021 @03:04PM (#28709983)
...and trying to completely corner and monopolize the web.
Re:Cloudflare's Disruption by 0xdeadb00f on Thursday September 30, 2021 @06:43PM (#28712218)
That is, truly, "amazing" as the parent comment puts it.