✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Cloudflare vs. Netlify v. Vercel for Next.js Headless Websites

13 replies
Last updated: Dec 9, 2021
curious if anyone out there is running next on cloudflare? seems like as my clients scale, vercel and netlify are both becoming pretty expensive and cloudflare looks very affordable, but curious if anyones done the switch
Dec 9, 2021, 1:28 AM
Not nextjs, but I deployed a toy Sveltekit site on Cloudflare Pages & the build time has been really slow for such a tiny site 🤔 They have a list of known issues (that you’ve probably seen) here: https://developers.cloudflare.com/pages/platform/known-issues
Dec 9, 2021, 4:29 AM
yeah i did see that, honestly the slow build times is basically like.. what i expect at this point, my next.js site built 2x slower on vercel than netlify. so i basically assume the whole static world is meh 🙂
Dec 9, 2021, 4:33 AM
i like how it specifically mentions netlify forms & functions, but fails to note that they have their own workers for doing serverless stuff
Dec 9, 2021, 4:34 AM
also what’s really small and really slow? I have tiny netlify sites that take a few minutes (under 100 pages) and some that are (800 pages that take 12 mins) i’ve even had similar 800 page sites take 16-20 mins and only fixed speeds by hyper optimizing queries
Dec 9, 2021, 4:37 AM
Haha yeah I noticed that too -- 'no mention of your own workers?'
Dec 9, 2021, 4:43 AM
It usually takes 1 - 2 minutes just to set up the environment
Dec 9, 2021, 4:43 AM
And then another 1 - 2 minutes to build a 20 page site, but very rarely it got hang up & could take 5 - 7m. To contrast, another tiny sveltekit site I have on Netlify takes only 40s to deploy
Dec 9, 2021, 4:45 AM
I think the environment set up is no big deal as it’d be the same for sites of all size, but the actual build time worry me a bit — cloudflare page has a 20 min max build time I think
Dec 9, 2021, 4:52 AM
oh hhm scratch all that I went take a look & it took 2m to set up the environment, but the actual build time is only 20s or so — so roughly same as Netlify
Dec 9, 2021, 4:56 AM
Hard to calculate costs, but you could look at aws too:
https://ness.sh/ which runs the following
https://github.com/serverless-nextjs/serverless-next.js
Dec 9, 2021, 11:42 AM
i like aws mostly because cost is just like a raw factor of usage instead of some abstract fixed metrics of
500gb for x dollars
Dec 9, 2021, 4:45 PM
I’d suggest taking a look. It’s really easy to deploy unless you need to mix different cloudfront options into the mix.
Dec 9, 2021, 4:47 PM
okay i only clicked ness, not clicking the serverless next and yeah this looks very sick
Dec 9, 2021, 4:48 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?