8
6 Comments

The importance of Cloudflare

I recently launched a cool little tool for extracting audio from any video directly in your browser as an addition to my core product. In any case, I promoted it over at hackernews https://news.ycombinator.com/item?id=27014071 and as you can see it didn't even get that many likes, but the amount of traffic I received from it was insane.

This brings me to my point, there is a phenomenon known as the hug of death (https://thehftguy.com/2017/09/26/hitting-hacker-news-front-page-how-much-traffic-do-you-get/). In short, the hug of death is when so much traffic hits your server, it crashes. This is clearly not what you want.

During peak traffic for HN, I had served about 9GB of content. This is partly due to a large bundle file that I need to serve. Luckily for me, I had Cloudflare proxying my web traffic and it cached 99% of it. 99%! For free!

For me, at this point, it's a no-brainer. So what am I missing? Why isn't everyone using them?

on May 3, 2021
  1. 5

    I use cloudflare too. Great for exactly what you mentioned, plus a variety of other stuff. I love some of their firewall features.

    That said there are plenty of good possible answers to, "why isn't everyone using them":

    • Awareness. Probably a lot of people aren't aware cloudflare exists. No way to prove it but I'd say this is probably reason number one.
    • Need/urgency/apathy. I knew about Cloudflare for a while, but it probably was a year or more before I got around to plugging it in. It just was way down the list of things my product absolutely needed.
    • Compatibility. Cloudflare might not work depending on your technology stack. For example, ~I don't think Cloudflare's certificate-signing system works with Heroku free tiers~ (edit: not/no longer the case). Or you might be running a business entirely on a hosted platform like wordpress and can't change DNS. Things like that.
    • Privacy/ethics. A lot of people don't like the idea of a single company "controlling" the internet, or otherwise giving Cloudflare the level of access they need for their product to work. Cloudflare is also regularly in the news for their policy decisions, e.g. refusal to kick customers that host some kinds of objectionable content. Basically you might think CF is evil, and who am I to tell you you're wrong?

    That stuff aside, I agree it's a no-brainer for a lot of indie-scale projects (especially). Free content cache, & a host of other tools. Really great value.

    1. 1

      Cloudflare certs definitely works with Heroku free tiers. It's how a lot of users get free certs rather than paying Heroku for them. (I used to do this, and sometimes still do).

    2. 1

      You make some great points. I guess the urgency for me was higher to integrate due to the large file size. With regards to the privacy aspect, I don’t feel that benefitting from a service that has policies that others find objectionable is problematic. But I agree that it’s probably a combination of lack of awareness + low priority that causes many people not to use it.

  2. 2

    Having a CDN is super important. There are others including Cloudfront (if you using AWS) and Akami.

    Every site should use one and I always use one even in small side projects.

    Other benefits we've gotten from Cloudflare:

    • Page load times for your users. Cloudflare keeps copies of the data in servers around the world, so your pages will load faster
    • You can selectively cache things. At my current job, we are a B2B SaaS product. We've cached the results of one API call that fetches a config file from us. Huge performance benefit to our backend server load
    • You can selectively block things. Server crashing? Narrowed it down to one webpage, API end point, or customer account? We can block them in Cloudflare to take the load off our server while fixing the problem.
  3. 1

    I recommend Cloudflare to most people.
    I use it for all my projects and most clients.

    Most people to whom I explain what a cdn is and what it is for ... end up using a cdn. As they have already said, the main reason is the lack of knowledge of the advantages of CDNs.

    Just for the blocking of bot attacks or the savings in the transfer, it should always be mandatory to use a CDN.

  4. 1

    Nifty.
    I see many comments on HN about 'oh why not use ffmpeg or may be iMovie or another tool. But - we needed a simple web based tool to extract audio - and yours fit that bill!

    @CloudFlare - I also discovered magic of CloudFlare a bit late - but at caching at 99% at free is simply amazing.

    CloudFlare also masks IP address of server to some extent that is bonus too!

  5. 2

    This comment was deleted 4 years ago