Netlify vs Vercel vs Cloudflare Pages vs Google Cloud vs AWS Amplify
- svelte, html, jamstax
As soon as I decided to move some of my websites using jamstack I was faced with the the issue of hosting or -- better said in the case of jamstack -- deploy my shiny new website.
I have tried Google Cloud, Netlify, Vercel and Cloudflare pages and here are my comments on each of them:
Google Cloud 😐
This is technically not a real jamstack provider (yet) because the traditional setup would be a bucket and google cloud balancer for the SSL certificate. The bucket storage is very cheap but it seems that the cloud load balancer would be at least 18$ a month according to this article.
It appears that you can automate using cloudbuild but it doesn't appear to be as user friendly as the other providers. I also highly dislike that the price for the load balance is not transparent (you need a PhD in Accounting to figure it out) so I can't recommend this solution.
I also don't like the warning sign that appears on the bucket as it will publicly accessible.
It might however fit in some situations e.g. you don't need continuous integration and can use a CNAME with your own free SSL certificate (so no cloud load balancer).
Netlify boosts a lot of heavy weight clients like Nike, Shopify, Danone and Unilever.
The interface is very user friendly and is easier to get started: all you need is a git repository and you can start continuous deployment of your jamstack.
It even support SWIFT for static websites so if you build your website in Swift using publish this is your best option.
There are a lot of functionality out of the box like roll back to a previous build and pricing is fair and transparent. I could build my Svelte/Sapper project in just few minutes. Highly recommended.
Vercel 🥈tier 🥇
Vercel is another Jamstack specialist that does offer a lot of services including serverless functions. According to their website they enjoy the trust of several big corporations like tripadvisor, macdonald, airbnb and uber.
I am currently using vercel for one serverless function and a svelte project. ~~However, I couldn't get my sapper static website to work properly. It is very strange as it builds but only serves what is on github in the sapper/export folder so the build it creates is not used in deployment. If I remove the export folder for git it doesn't build anymore. ~~ I actually figured it out. Vercel uses a different command to build sapper projects, I had to overwrite it to yarn export and then remove from git the sapper/export folder to avoid any conflict. Pay attention to the default options 😅
Their offering is similar to Netlify so it is really a matter to try both and stick to the one that works best for you.
Clouflare pages 🥇
Cloudflare, already leader in CDN, DNS and attacks mitigation has now entered the Jamstack business in force. Their offering cloudflare pages is almost unbeatable.
If you are looking to host a jamstack site made with Hugo, Gatsby, React, Vue or Svelte you get a global CDN, 500 builds a month, unlimited request and bandwith for 0. That's right, this is the free tier. The paid tier of 20$ has 5,000 builds which I don't think are needed by most small-mid size projects.
Github integration is great: you just link your repository, add the build commands and you are live in no time.
Given the strong CDN and DNS services, the generous free tier I think that this is the winner for most user cases. The only downside is if you need other functionalities e.g. build notifications seems to be missing and I think that serverless functions are separate in cloudflare workers albeit limited to JS, Rust, C and C++ (on Vercel go and other languages are also possible).
AWS Amplify 🛑
The bad practices mention goes to AWS amplify. At the time of writing it requires access to ALL your repositories private and public as per this github issue. That is simply a no no so this stopped me for even trying to use it. Not recommended.
So which is the best? 🤔
In my ranking Vercel jumped ahead of netlify because deploying a serverless function and a svelte project was a breeze. I also like the vercel bot comments to commit (possibly on netlify too but needs to be configured).
For a typical jamstack set-up cloudflare pages is currently the most competitive offering.
Update 27 June 2021
After using both Cloudflare pages and Vercel for a while I would like to add that for certain features (e.g. serverless functions, fauna integration) Vercel is actually better than Cloudflare pages. Additionally, build time seems to be always faster on vercel. This said, Cloudflare pages has a much wider edge network so it is still highly recommended for production projects.