Hacker News new | ask | show | jobs
by jarofgreen 466 days ago
> One key thing to underline: each request in the test is just a single call to the pre-rendered Next.js page. No assets are requested. A real visitor would need 60+ additional requests. That means as few as three simultaneous visitors could push the server dangerously close to its limit.

Ok but remember browsers will reuse HTTP connections, HTTP2 introduces multiplexing, and browsers have tight mode. So you can't just take the figures for 1 request and divide by 60 to get the real world performance.

1 comments

Reusing HTTP connections is not relevant if the app is behind a reverse proxy like nginx, which, last time I checked, still didn’t proxy with http2 multiplexing connections to the app server.
Connection reuse matters in high latency situations like for end-user connections. The fact that connections over localhost (or even UNIX socket) between your reverse proxy and app server aren't reused is no big deal as it takes less than a millisecond to establish a new one anyway.
Depends where the bottleneck is. But basically, we're saying different server setups are also a factor and another reason why you need to do testing with representative loads :-)