2021年5月3日星期一

HTTPS connection keep alive performance

Does anyone know what's the difference, in milliseconds and percentage, between the total time it takes to make an HTTPS request that is allowed to use keep alive vs one that doesn't? For the sake of this question, let's assume a web server that has one GET endpoint called /time that simply returns the server's local time, and that clients call this endpoint on average once a minute.

My guess is that, putting the server on my home LAN, and calling /time from my laptop on the LAN would take 200ms. With keep-alive it's probably going to be 150ms. So that's 50ms difference, and 25% improvement.

My second question is similar, but only considers server processing time. Let's say the server takes 100ms to process a GET /time request, but only 50ms to process the same with keep-alive. That's 50ms faster, but a 50% performance gain, which is very meaningful as it increases the server's capacity.

https://stackoverflow.com/questions/67351016/https-connection-keep-alive-performance May 02, 2021 at 05:30AM

没有评论:

发表评论