Data-cache reads and new pricing model
Unanswered
Barbary Lion posted this in #help-forum
Barbary LionOP
I'm on my second day of my billing cycle and I noticed the new pricing model take into effect and I think i have to think of something or leave Vercel. I'm getting 5-10k users a day and currently I'm not charging. Ideally I should be charging but my site is non-profit. I'm just looking for some temporary fix until I figure out what to do with my site: https://history-maps.com/
The biggest concern right now is data-cache reads. Is there a way to opt out of this? I'm already at 2m/10mb limit and I even have the attack mode enabled which limits my traffic.
The biggest concern right now is data-cache reads. Is there a way to opt out of this? I'm already at 2m/10mb limit and I even have the attack mode enabled which limits my traffic.
26 Replies
I'm already at 2m/10mb limitdata cache bandwidth?
Barbary LionOP
@Barbary Lion I'm on my second day of my billing cycle and I noticed the new pricing model take into effect and I think i have to think of something or leave Vercel. I'm getting 5-10k users a day and currently I'm not charging. Ideally I should be charging but my site is non-profit. I'm just looking for some temporary fix until I figure out what to do with my site: https://history-maps.com/
The biggest concern right now is data-cache reads. Is there a way to opt out of this? I'm already at 2m/10mb limit and I even have the attack mode enabled which limits my traffic.
do you use any fetch() or unstable_cache() in your server component code?
history-maps dot com looks like it can actually be a 100% static site, if so i'd recommend using static export and deploy to a cheaper host
@joulev do you use any fetch() or unstable_cache() in your server component code?
Barbary LionOP
i'm actually not using server components. i upgraded to nextjs 14 but still using getStaticProps. I use some fetch() in my code, but the data does NOT change very often. So, I would keep nextjs but just deploy to a different service?
I haven't looked around for cheaper host? do you have any suggestions?
I haven't looked around for cheaper host? do you have any suggestions?
@Barbary Lion i'm actually not using server components. i upgraded to nextjs 14 but still using getStaticProps. I use some fetch() in my code, but the data does NOT change very often. So, I would keep nextjs but just deploy to a different service?
I haven't looked around for cheaper host? do you have any suggestions?
my work app is being deployed in cloudflare pages which is pretty cheap
and can handle millions of requests easily – just checked the dashboard, we got some 8 digits figure last month
(of course that is still a paid plan but should be significantly cheaper than vercel paid plan, while free plan i dont know how it performs at scale but at least you have unlimited bandwidth)
@joulev my work app is being deployed in cloudflare pages which is pretty cheap
Barbary LionOP
Thanks. I'll look into Cloudflare.
@joulev (of course that is still a paid plan but should be significantly cheaper than vercel paid plan, while free plan i dont know how it performs at scale but at least you have unlimited bandwidth)
can you use all the nextjs feature when hosting on cloudflare?
@B33fb0n3 can you use all the nextjs feature when hosting on cloudflare?
[nope, not all. it supports many features, though](https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/). but from my initial interactions with OP's website, it seems very likely to be fully hostable [as a static website](https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-static-nextjs-site/) on cf.
@joulev [nope, not all. it supports many features, though](<https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/>). but from my initial interactions with OP's website, it seems very likely to be fully hostable [as a static website](<https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-static-nextjs-site/>) on cf.
oh ok. I guess only vercel can support all features of next 😦
@B33fb0n3 oh ok. I guess only vercel can support all features of next 😦
no. if you simply rent a VPS, deployment is as simple as
next start and all features are supported. only non-vercel serverless platforms struggle with supporting all features due to their architecture@Barbary Lion leave Vercel 😆
@joulev [nope, not all. it supports many features, though](<https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/>). but from my initial interactions with OP's website, it seems very likely to be fully hostable [as a static website](<https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-static-nextjs-site/>) on cf.
Barbary LionOP
Hi. What features are we talking about? If this is backend stuff like analytics, rate limiting, edge requests, optimization stuff, etc. I don't really need any of those. Is there a link I can check out to know what I might need to refactor? As I understand it, I'm just using Nextjs as a framework on top of React and now I'm thinking of hosting it on some other provider. Is that accurate?
@Barbary Lion Hi. What features are we talking about? If this is backend stuff like analytics, rate limiting, edge requests, optimization stuff, etc. I don't really need any of those. Is there a link I can check out to know what I might need to refactor? As I understand it, I'm just using Nextjs as a framework on top of React and now I'm thinking of hosting it on some other provider. Is that accurate?
the most limiting factor is that it requires your server-side logic to run on the edge runtime, but this is mostly irrelevant to your app as far as i can tell.
other than that, it should be good to go.
bonus point that if your app can be statically exported (it looks like it should be), no code changes will be required to use cf pages (or virtually any static hosting platforms which tend to be cheap).
<Image> also doesn't work, you can just use <Image unoptimized> or <img>.other than that, it should be good to go.
bonus point that if your app can be statically exported (it looks like it should be), no code changes will be required to use cf pages (or virtually any static hosting platforms which tend to be cheap).
@joulev the most limiting factor is that it requires your server-side logic to run on the edge runtime, but this is mostly irrelevant to your app as far as i can tell.
`<Image>` also doesn't work, you can just use `<Image unoptimized>` or `<img>`.
other than that, it should be good to go.
bonus point that if your app can be statically exported (it looks like it should be), no code changes will be required to use cf pages (or virtually any static hosting platforms which tend to be cheap).
Barbary LionOP
it seems you can opt out of certain features in the new pricing plan
To opt out of Data Cache reads in your Next.js application, you can disable fetch caching. Here is how you can do it:
Disabling Vercel Data Cache
You can disable the Vercel Data Cache by using the following configuration in your Next.js application:
export const fetchCache = 'force-no-store';
Alternatively, you can opt out individual fetch requests by using the cache option:
const res = await fetch('https://example.com', { cache: 'no-store' });
To opt out of Data Cache reads in your Next.js application, you can disable fetch caching. Here is how you can do it:
Disabling Vercel Data Cache
You can disable the Vercel Data Cache by using the following configuration in your Next.js application:
export const fetchCache = 'force-no-store';
Alternatively, you can opt out individual fetch requests by using the cache option:
const res = await fetch('https://example.com', { cache: 'no-store' });
@Barbary Lion it seems you can opt out of certain features in the new pricing plan
To opt out of Data Cache reads in your Next.js application, you can disable fetch caching. Here is how you can do it:
Disabling Vercel Data Cache
You can disable the Vercel Data Cache by using the following configuration in your Next.js application:
export const fetchCache = 'force-no-store';
Alternatively, you can opt out individual fetch requests by using the cache option:
const res = await fetch('<https://example.com',> { cache: 'no-store' });
Which is equivalent to dynamic rendering. I would argue that in your case, dynamic rendering can easily blow the serverless function execution limit.
@joulev Which is equivalent to dynamic rendering. I would argue that in your case, dynamic rendering can easily blow the serverless function execution limit.
Barbary LionOP
oh i see. so it will actually cost more?
well, you need to try it and see
Barbary LionOP
@joulev
I think that ISR content is the one causing the charges. I only have 4 places on my site that uses ISR, ie 4 places using revalidate property. I'm going to just remove them to see if that does the trick.
I think that ISR content is the one causing the charges. I only have 4 places on my site that uses ISR, ie 4 places using revalidate property. I'm going to just remove them to see if that does the trick.
My whole site is static using getStaticProps and gerServerSideProps with the exception of those 4.
@Barbary Lion <@484037068239142956>
I think that ISR content is the one causing the charges. I only have 4 places on my site that uses ISR, ie 4 places using revalidate property. I'm going to just remove them to see if that does the trick.
well i cant claim i know exactly what counts as data cache reads and what doesnt count. im just a normal user like you, i dont have access to internal logic
may I have a question? do other hosting platforms charge for cache data? Vercel isn't a must for next.js ISR, right? @joulev
@James4u may I have a question? do other hosting platforms charge for cache data? Vercel isn't a must for next.js ISR, right? <@484037068239142956>
caching takes up resources so all platforms should have a cost for it one way or another. nothing is free. this is cf pages pricing: https://developers.cloudflare.com/kv/platform/pricing/