Reputation: 29
I deployed a Nextjs app on Vercel. I found that the response time of the SSG pages with getStaticProps
is slower in the first page load. The subsequent page load are instant. Why is this the case?
I expect that all page loads should be instant because they are cached in the CDN during build time. I am sure that the pages are SSG because I view them tagged as SSG in the build logs. What am I missing here? Thank you.
Upvotes: 1
Views: 1520
Reputation: 36
The static files are not in the CDN on first request after building.
Pull-based CDNs load the data on the first request and keep it around until it expires. Vercel handles most aspects of our infrastructure like a pull-based CDN
Upvotes: 2
Reputation: 838
The problem vercel server work like serverless if your website no one call him for a while Vercel will set your app to idle mode
Upvotes: 0