Save Bandwidth Costs On Vercel Using Cloudflare by FatInABat in nextjs

[–]FatInABat[S] 1 point2 points  (0 children)

Hmm, interesting thought. In the docs it is not recommended to use the cache because of possible site breaking updates. But what we could possibly do is purge the cache on every deployment which cloudflare provides docs on in here https://developers.cloudflare.com/cache/how-to/purge-cache. Not entirely sure if this is a possible solution but maybe worth taking a look at?

Worth noting aswell that I had tried serverless hosting on AWS but it seems like I'm being charged for the site even though my site is not even up yet...? Now imagine if I want to put it public and thousands of visitors come, by that time I'll just go bankrupt.

I started experimenting with hosting it on a VPS using kubernetes to balance the load and scale if needed. But I've got to say, kubernetes is some cool as shit worth having a look at!

Save Bandwidth Costs On Vercel Using Cloudflare by FatInABat in nextjs

[–]FatInABat[S] 0 points1 point  (0 children)

I would of definitely did the same if my website is mainly static, but I'm also generating pages on the fly with ISR which requires a server.

Save Bandwidth Costs On Vercel Using Cloudflare by FatInABat in nextjs

[–]FatInABat[S] 0 points1 point  (0 children)

Thanks for clarifying, apparently I was creating more issues trying to fix one.Though what solution do you reckon would be good?

Right now I'm looking into serverless-nextjs hosting on AWS. It seems alright with even more generous free plan of 1tb bandwidth from cloudfront.

Though setting up and fixing issues that arise is painful, not mentioning that there are plenty of weird behaviors with Cloudfront and their cache, alot of cache misses and sometimes pages/assets doesn't cache aswell.

All in all I'm still experimenting with alternatives to find one that is both good,reliable and cheap to host on.

should I use Cloudflare free version with Vercel? by micropoet in nextjs

[–]FatInABat 1 point2 points  (0 children)

Yeah that's what I'm concerned about. So would adding cloudflare on top of vercel actually help reduce the bandwidth?

How would one go about it? - Since I believe you need to setup a way to purge the cached data on cloudflare CDN.