react-redux-universal-hot-example
react-redux-universal-hot-example copied to clipboard
SSR with high traffic
Hi,
Firstly, thanks @bertho-zero for continuing contribute this repo.
I have an issue with high traffic, the server responses first time very slowly. It can not handle 20 request / second although i use server with 8 core 8 Gb memory. I checked CPU, Memory number are still normally. Maybe it was blocked by node single thread. We have a SSR issue with high traffic. Does anyone have solution for this?
Thanks!
You mean that you should add a cluster manager or use pm2 and pm2 scale
?
I used pm2 scale 8
to increase node process but it did not affect.
I am facing the same issue and I believe it is necessary to prebuild Webpack and ship the frontend to a CDN. This will help a lot with your first load. What are your thoughts @bertho-zero ?
I'm using varnish cache.
React 16 increases server side rendering performance by 2-3 times.
I am also having same issue of server side rendering, it takes more time(6-7 seconds) for large component tree, Anyone found solution on this?
@MHerszak Have you tested the use of a CDN? I would like to know, if possible, the potential gains.
@anhdn Does this mean that the problem is fixed with varnish cache?
If you have more details about the cause of the problems with high-traffic, do not hesitate to share.
@bertho-zero I am going to use a CDN in the near future. But this will not fix the problem on first load which is the only problem I have. As soon it is cached it is fine.
@bertho-zero we use varnish to cache html. But i think you should upgrade to react 16, improve performance of ssr a lots.
@anhdn I upgraded to react 16, which is between 2 and 4 times faster with SSR.
News for that since all these updates?