January 18, 2023
Deploy to a free hosting platform
Sometimes people ask me to deploy their websites to a free hosting platform, like Cloudflare Pages, Github Pages, Netlify or Vercel. Their reasoning is often that these platforms can handle endless amounts of requests and that they are cheaper to use. But is this really true?
Not immune to the Digg effect
The Digg effect is the effect that a spike in traffic brings a website down. You would think that most of these (free) big static hosting platforms are immune to the Digg effect, because they all use a CDN. A CDN is capable of handling thousands of vitors at the same time, right? I recently found out that this is not always true. One of my heavier/larger websites recently got increasingly popular, because the company was featured on Dutch national television. Guess what happened? The website, which was hosted on Cloudflare, became terribly slow. It became so slow it eventually ceased to fully load: the Digg effect. Cloudflare must have lowered the speed at which the data was served with each new request, in order to prevent heavy load on their systems. This resulted into the site going down (effectively). So, you cannot assume that these free platforms will keep your site up and running when it suddenly becomes popular and starts to cost them some money.
Edit: Cloudflare has admitted the problem and apologizes. However, the website in the article did not belong to our client. This makes clear that Cloudflare is unaware of the size/scale of this problem. The problem occurs because companies like Cloudflare throttle traffic spikes (traffic shaping, as they call it in this article). They do this to prevent cost and DDOS attacks. However, DDOS attacks are almost impossible to distinguish from spikes of legitimate interest (which they seem to confirm here). We must assume that these platforms are not immune to the Digg effect, until proven otherwise.
Cheaper means slower
These platforms all use virtualization, which causes builds and deploys to become much slower than required. In Netlify you can clearly see that they spin up a VM for each build or deploy. This causes a huge overhead. One of my clients moved to Github Pages for the builds and deploys of his Jekyll website. The time to live changed from less then a minute to more than 15 minutes! Ouch! Another client wanted his website to be deployed by Github Action over FTP. The initial deploy took more than 10 minutes and subsequent deploys took around 3 minutes. Whether you have to wait 15 or 3 minutes for each change to go live… it is too long. Our own CMS and deploy pipeline can deploy a website in just a few seconds (often in just one second). This is because we do NOT use virtualization, we use Go for our builds and we build and deploy on the same machine. Eventually you have to decide what is more valuable to you: ‘your time’ or ‘spending a little extra on hosting’?
Do you want to experience instant builds and deploys? Contact me!
() Joost van der Schee