The purpose we use SSR is for first screen time.
I use SSR for our activity project, because it always be a page toward C-end users.
There is many SSR framework to save your life.Such as NextJS(react), NuxtJS(Vue).
And I will show you first screen time when using SSR(based on React).
Elk APM provide the data to analyze the first screen time.
without SSR: 1300+ms
with SSR: 400+ms
It's a big optimization.
But there is a question:
server side render need CPU and Memory.
without SSR TTFB: 1ms
with SSR TTFB: 30+ms
So the server maybe get down by the too many user access.
How resolve it?
The most easily solution is to use a server side cache.
We will cache all the server side render html by router path, so the server will not repeat render the same page again and again.
And another question: If we use micro service on our server, how can we decide the cache part between server side render html and server side data fetch?
The purpose we use SSR is for first screen time. I use SSR for our activity project, because it always be a page toward C-end users. There is many SSR framework to save your life.Such as NextJS(react), NuxtJS(Vue). And I will show you first screen time when using SSR(based on React). Elk APM provide the data to analyze the first screen time.
It's a big optimization.
But there is a question: server side render need CPU and Memory.
So the server maybe get down by the too many user access. How resolve it? The most easily solution is to use a server side cache.
We will cache all the server side render html by router path, so the server will not repeat render the same page again and again.
There is the data we use server cache