Nextjs isr custom server

Hey, I am currently building my first webapplication with nextjs material-ui etc. I really like the incremental static regeneration (ISR) and use it on all pages where content might change. In my case I want to revalidate pages every 30 minutes or something like that, because updates should not be that frequently. I want to deploy the whole app on a custom server, because I have no money for vercel ^^

However, I’m afraid that the server might not be able to handle traffic spikes so I want to use a cdn. As far as I understood I can just point my domain to cloudflare and cloudflare to my custom server using cloudflares dns service. My assumption is that cloudflare will let the request go through if it is the first request or 30 minutes have passed and cache the result. Requests within the 30 minutes will be handled by cloudflare. Is my assumption right?

I think I found the answer already I guess nextjs sets the max-age cache header and cloudflare understands it https://developers.cloudflare.com/cache/about/cache-control

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.