Wanted to revisit the above in a different manner i.e. distribution of % of requests in a page having keep-alive in response header.
SELECT bucket, count(keepAliveRatio)
ROUND(keepAlive/reqTotal * 100, 0) bucket
SUM(IF(resp_connection = “keep-alive”,1,0)) keepAlive,
GROUP BY pageid
GROUP BY bucket
ORDER BY bucket ASC
It appears a large number of web pages have less than 50% of their responses with keep-alive. It would be interesting to see if this is because of requests to third party sites.
To check the overall use of keep-alive, used the following query.
SUM(IF(resp_connection = “keep-alive”,1,0)) keepAliveOn,
SUM(IF(resp_connection != “keep-alive”,1,0)) keepAliveOff