Live data from Hacker News

CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

foxy.io

31–40 of 57 posts

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#31
post #26

Anybody using Cloudflare to cache an API that serves JSON? Thinking about setting that up.

I did. If you need eviction, things get either suboptimal, complicated or costly. If you don't need that the only other thing to watch out is the upload size limit, and we'll only if that is ever relevant to you. You might want a direct endpoint for these.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#32
post #5
post #3

Now that CloudFront has greatly improved its performance, what's the pitch for using CloudFlare over it?

Price is the main difference between AWS CloudFront/Fastly and CF. In most cases, CF prices are fixed, like $200 for business or $20 for the pro plan. If you like fixed prices VMs from Linode or DO, chances are high that you will like Cloudflare too. Of course, advanced addons features like CF Argo and CF Bot management cost more money at Cloudflare too.

- Last I checked, the $20 plan has no SLA whatsoever and the $200 has a pretty poor one. Thought admittedly I don't know whether Cloudfront is better there.

- You can't serve all kinds of traffic with Cloudflare self-serve plans. Including some of the ones that tend to use the most bandwidth.

- According to the CloudFlare self-serve plan TOS, IIRC, if you start being a too-heavy user on the those plans CloudFlare can (and, I've heard, will) tell you to upgrade to an enterprise plan. Last I checked (this part's personal experience) they're not super interested in serving enterprise customers very far under a minimum $5k/month level, so there's a huge gap there in which other services are a much, much better value.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#33
post #21
post #12

Earlier quoted context omitted.

While that lasts, you can't be charging a flat $200 in a world where the other players are charging 5-10¢/GB of egress.

I said the opposite ("cloud providers can't keep charging 5-10¢/GB egress") a few years ago, but I guess I was wrong. I still think their pricing is absolutely insane in a world where even the smallest companies can colo a server and get wholesale transit that works out to But I guess nobody's really pushing traffic so nobody cares about $/GB.

> I still think their pricing is absolutely insane in a world where even the smallest companies can colo a server and get wholesale transit that works out to Their pricing's insane in a world where you can get prices not too far from that wholesale rate for CDN service (which is a whole different beast from having one or two colo'd servers).

And anyway, nobody pushing serious bits is paying public rates, anywhere. Those discounts can be huge. In fact I wouldn't be surprised if part of the reason cloud providers have such high rates is so they can give their counterparts an easy, very impressive-looking "win" in negotiations.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#34
post #26

Anybody using Cloudflare to cache an API that serves JSON? Thinking about setting that up.

Depending on what you're doing with it, that may technically be against the TOS on any of their "self-serve" plans, including the paid ones. You might get away with it anyway, especially if your traffic is low, but you'd be rolling the dice.

If it's consumed by a web app, doesn't it make it okay? Otherwise any api behind cloudflare would be violating the TOS...

> 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.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#35
post #26

Anybody using Cloudflare to cache an API that serves JSON? Thinking about setting that up.

If you're using the CDN by default it won't cache dynamic URLs. I'm 99% sure it will cache static .json files though, if that can work for you.

You can also create "page rules" using wildcards to cache dynamic URLs. Eg: /api/*

Another option is to use Workers to fetch from origin and interact with the cache with more control.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#36
post #21

Earlier quoted context omitted.

I said the opposite ("cloud providers can't keep charging 5-10¢/GB egress") a few years ago, but I guess I was wrong. I still think their pricing is absolutely insane in a world where even the smallest companies can colo a server and get wholesale transit that works out to But I guess nobody's really pushing traffic so nobody cares about $/GB.

> I still think their pricing is absolutely insane in a world where even the smallest companies can colo a server and get wholesale transit that works out to Their pricing's insane in a world where you can get prices not too far from that wholesale rate for CDN service (which is a whole different beast from having one or two colo'd servers). And anyway, nobody pushing serious bits is paying public rates, anywhere. Th…

Yeah I was going to say much the same. Nobody with a large cloud bill is paying anywhere near list price. It's very hard to compare services apples to apples without actually getting a private quote from each side's sales team unfortunately.

This applies to all "enterprise software" too, btw. We've had quotes from vendors that started at 50% off list price, and then negotiated down further from there. It's pretty ridiculous.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#37
post #5
post #3

Now that CloudFront has greatly improved its performance, what's the pitch for using CloudFlare over it?

Price is the main difference between AWS CloudFront/Fastly and CF. In most cases, CF prices are fixed, like $200 for business or $20 for the pro plan. If you like fixed prices VMs from Linode or DO, chances are high that you will like Cloudflare too. Of course, advanced addons features like CF Argo and CF Bot management cost more money at Cloudflare too.

I have a small service for an nfp on the $20 plan and I remember working out cloudfront+aws was would have set them back roughly 1500 per month, and that's without looking into occasional viral traffic spikes. The price disparity is baffling.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#38

IMO Perfomance wise CloudFront and Cloudfront are quite similar. I've migrated from CloudFront+AWS WAF to just CloudFlare given Cloudflare's superior (100x better) WAF/Firewall/DDOS protection at a lower cost

Out of curiosity, what makes Clousflare's WAF so much better?

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#39
post #5

Earlier quoted context omitted.

Price is the main difference between AWS CloudFront/Fastly and CF. In most cases, CF prices are fixed, like $200 for business or $20 for the pro plan. If you like fixed prices VMs from Linode or DO, chances are high that you will like Cloudflare too. Of course, advanced addons features like CF Argo and CF Bot management cost more money at Cloudflare too.

I have a small service for an nfp on the $20 plan and I remember working out cloudfront+aws was would have set them back roughly 1500 per month, and that's without looking into occasional viral traffic spikes. The price disparity is baffling.

It makes sense if you consider the fact that one complaint is printing money while the other is bleeding it.

Re: CloudFront vs. Cloudflare, and how to reduce response times for both (2021)

#40

IMO Perfomance wise CloudFront and Cloudfront are quite similar. I've migrated from CloudFront+AWS WAF to just CloudFlare given Cloudflare's superior (100x better) WAF/Firewall/DDOS protection at a lower cost

Out of curiosity, what makes Clousflare's WAF so much better?

The ability to scan the whole of a request body rather than just the first 8kB.
Post reply on HN