-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sitecore jss + proxy has degrading performance in amount of requests served per second #324
Comments
Closing this ticket as this is expected behavior. The behavior you describe is not an issue with JSS, as the Layout Service scales better than MVC as traffic increases. It's an issue with Node - this is a a side effect of using the server to render virtual-DOM-based frameworks (React, Angular, Vue), which are optimized to run in browsers. For SSR, Node has to create and re-create a virtual DOM server-side, which is extra work that's normally done by the browser. This is a very intensive operation, which can require several updates as async data is fetched to construct the page. As traffic increases, the Node server becomes your bottleneck as it tries to keep up with the demands of SSR. For Sitecore's recommendations on how to tackle performance issues in JSS applications, please watch these videos: |
@NickiSibbern - I may have misunderstood your description of the "load test". |
@anastasiya29 it is the latter, I ran the test with the same parameters each time, eg. X concurrent connection for X amount of time. I should mention that we tested this with the following load test tools the result was seemingly the same, degrading performance: SSR is ofcourse CPU intensive and we would not expect that we could uphold the same amount of RPS over time as the CPU load increases, we would however expect that after a stabilization period where we stop the load test to let the CPU go back to 1-2% we would achieve higher RPS again, this is not the case, for each consecutive run the RPS just degraded further and only way to achieve the RPS of the first run is to "recycle" the NodeJS instance. |
@NickiSibbern Fixed in commit |
Hi @sc-illiakovalenko I did a new test with 13.0.3 and it does not seem fixed to me. Below is the test results, Could you please share your results, maybe I am doing something wrong when running the tests. jss --version proxy server taken from dev branch, latest commit is:
autocannon -c 50 -d 120 http://localhost:3000/#1 | Req/Sec: 123 Requests: 15k Latency: 313ms Bytes/sec: 3.47 MB the numbers are the taken from the avg. output from autocannon Observations:
|
@NickiSibbern Yeah, thank you. I found another possible problem. I'll continue to investigate it |
@NickiSibbern Hi! Please install latest version and try again to run load test, i pushed fix. |
Hi @sc-illiakovalenko I will have to do some more testing but a quick test indicated that the problem seems fixed. |
Description
Using Sitecore jss react and proxy the amount of requests per second the proxy handles will degrade over time
Expected behaviour
Requests per second should stay the same or be near the same over time
Steps To Reproduce
Your Environment
Sitecore 9.3
JSS 13
test was performed locally and on a kubernetes cluster
Results from own testing
this issue (#287) mentions there is a memory leak, so I did the test with and without the fix to rule out the memory leak
this is the result
The text was updated successfully, but these errors were encountered: