High number of Edge Requests with Nextjs / Vercel - what am I doing wrong? Or is this unavoidable?
Unanswered
Great Horned Owl posted this in #help-forum
Great Horned OwlOP
So I have been running my site for free, for some time now, and now that it has started gaining traction (100-300 users per day) - I noticed that I'm almost out of free Edge Requests?
My website is completely static. It has no backend or API.
https://i.imgur.com/tVtf9K7.png
Above is an image of the usage overview. Could someone explain to me if this is common? Is there a way to lower this number or is it directly proportional to the number of users viewing the site and there's nothing I can do about it?
All of this to say - I'm afraid I'll get a huge bill from Vercel just because I had a huge spike of users all of a sudden.
My website is completely static. It has no backend or API.
https://i.imgur.com/tVtf9K7.png
Above is an image of the usage overview. Could someone explain to me if this is common? Is there a way to lower this number or is it directly proportional to the number of users viewing the site and there's nothing I can do about it?
All of this to say - I'm afraid I'll get a huge bill from Vercel just because I had a huge spike of users all of a sudden.
12 Replies
@Great Horned Owl So I have been running my site for free, for some time now, and now that it has started gaining traction (100-300 users per day) - I noticed that I'm almost out of free Edge Requests?
My website is completely static. It has no backend or API.
https://i.imgur.com/tVtf9K7.png
Above is an image of the usage overview. Could someone explain to me if this is common? Is there a way to lower this number or is it directly proportional to the number of users viewing the site and there's nothing I can do about it?
All of this to say - I'm afraid I'll get a huge bill from Vercel just because I had a huge spike of users all of a sudden.
well.. as you can see "The number of cached and uncached requests...". So even if you have a static site that will be delivered, they count towards that limit. That can be assets, pages, ... everything that is hosted and served though the edge network of vercel.
To reduce the amount reduce the amount that is served thought vercel. A common thing is to have files, inside the public folder that can easily be served by a third parts (not vercel). So check: what was the most common thing that was requested and then move that away from vercel
Vercel itself says:
https://vercel.com/docs/pricing/networking#optimizing-edge-requests
To reduce the amount reduce the amount that is served thought vercel. A common thing is to have files, inside the public folder that can easily be served by a third parts (not vercel). So check: what was the most common thing that was requested and then move that away from vercel
Vercel itself says:
https://vercel.com/docs/pricing/networking#optimizing-edge-requests
@Great Horned Owl solved?
Asiatic Lion
Hey interested in what you ended up doing here. I have recently launched a product to the public (free platform) and experiencing similar usuage. The edge requests are the highest consumers of my hobby resources
Asiatic Lion
@B33fb0n3 : Interested if you can speak more to your comment "A common thing is to have files, inside the public folder that can easily be served by a third parts (not vercel)" . What service do you recommend for this? I have many cached files that are accumulating edge requests that could be potentially moved.
@Asiatic Lion <@301376057326567425> : Interested if you can speak more to your comment "A common thing is to have files, inside the public folder that can easily be served by a third parts (not vercel)" . What service do you recommend for this? I have many cached files that are accumulating edge requests that could be potentially moved.
I like to use bunny cdn with s3 in background. S3 saves the files. bunny cdn serves the files
@B33fb0n3 I like to use bunny cdn with s3 in background. S3 saves the files. bunny cdn serves the files
Asiatic Lion
Thx, will check it out.
@B33fb0n3 I like to use bunny cdn with s3 in background. S3 saves the files. bunny cdn serves the files
Asiatic Lion
Wouldnt this still consume an edge request tho? I might be a bit confused by how this works from vercel
@Asiatic Lion Wouldnt this still consume an edge request tho? I might be a bit confused by how this works from vercel
no, it wouldn't as the file is not hosted or in any way related to vercel
@B33fb0n3 no, it wouldn't as the file is not hosted or in any way related to vercel
Asiatic Lion
Im struggling to get my head around this concept :/
If, for example, I want to store and serve 2 asset types - the first is a .png logo and the other is a page.tsx. How would I instruct NextJS to know where to find these files? For example the import of the image and the serving of the page.tsx file.
If, for example, I want to store and serve 2 asset types - the first is a .png logo and the other is a page.tsx. How would I instruct NextJS to know where to find these files? For example the import of the image and the serving of the page.tsx file.
@Asiatic Lion you might want to open your own thread so others might see your issue as well. You can ping me once in your new thread about that topic
@B33fb0n3 I like to use bunny cdn with s3 in background. S3 saves the files. bunny cdn serves the files
Asiatic Lion
May I also ask here: Why you chose to use S3 instead of the bunny storage?
@Asiatic Lion May I also ask here: Why you chose to use S3 instead of the bunny storage?
bunny storage is more expensive than s3