I have a nextjs project deployed which has too many requests to dynamic routes. I have a url of format /embed/[widgettype]/[widgetid]. The actual url is created (with uuids) when user creates a widget so I cannot know these urls in advance. Vercel is treating these as serverless functions and I’m hitting the limits. Also my edge requests are also hitting limits.
Could you use Incremental Static Regeneration (ISR)? ISR allows you to create or update static pages after you’ve built your site. This can help reduce the load on serverless functions.
Are you using Vercel’s Edge Cache? You can significantly reduce the number of requests hitting your serverless functions.
Thanks @pawlean I’m using App Router and docs are not clear around ISR. Also is there a way I can reduce the overall # of edge requests? Is a request to edge cache still considered an edge request?