Next.js Discord

Discord Forum

SSR Rendering warming up

Unanswered
Morelet’s Crocodile posted this in #help-forum
Open in Discord
Morelet’s CrocodileOP
I have a homepage render in SSR that takes around 800ms when render the first time then around 100 ms when render the subsequent times.

To eliminate any external cause during my test, I created a mock of the content api that is used to fetch the content to display.

For more context, we want to let varnish handle the caching part instead of next.js itself because varnish has more possibilities. for instance for legal reason we need to serve a different content depends on the country without having any variation in the url.

That's the reason why we decided to use SSR.

I profiled with open telemetry and jaeger what is happening and here is what I have.

When I display the page just after having started the server. (image 1)
When I display the page again. (image 2)

How to warmup next.js to eliminate this first response time that is slower ?

0 Replies