ETag caching for notes polling - performance analysis
With https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9036 we introduced ETag caching for notes polling. We deployed it as 9.0 RC 2 around 16.03.2017 04:00 UTC.
Projects::NotesController#index.json
Graphs for
- Deployment of RC2 was not recorded in our monitoring dashboard, I marked a rough value with this nice red line
- This endpoint handles notes polling for issues, merge requests, snippets, commits. We introduced ETag caching only for issues. That's why the impact won't be that visible
- A transaction for
Projects::NotesController#index.json
will not be recorded if the ETag middleware returns 304 (cache hit) earlier, because it never ends up calling the controller. This is only my assumption about our performance monitoring system /cc @yorickpeterse - We only have 7 days back of data. This means 2 "standard business days" before the deployment and 3 "standard business days" after the deployment.
- Based on this quite limited data the rough estimate is 33% drop in the number of transactions
- Please note that the average number of Redis connections is still 2, it's the maximum number of Redis connections that increased to 4
- I'm confused by the terminology here (a Redis connection vs. a request to Redis). I thought that Redis connections were reused across a single request.
- If we ignore the previous point, this increase is expected. For issues this endpoint will be triggered only for cache misses. For a cache miss we make one Redis request to get the current ETag value and one Redis request to set the new ETag value