WIP: Make Workhorse to handle ETag caching
This MR adds ETag caching on Workhorse.
It verifies ETag stored in Redis for that request when client sends If-None-Match
.
Currently, this is handled in Rails: to check and generate new ETags. This MR moves checking part to Workhorse, reducing the load on Unicorn.
We are looking at reducing Unicorn load by around 1.2-1.3Mreq/hour according to this graph: https://performance.gitlab.net/dashboard/db/etag-events?orgId=1.
All these requests can be handled by Workhorse without visible client impact. If needed, this MR can be extended to use long-polling
on requests if the client would ask for that.
The cost? One Redis GET call per-every request. The cost is pretty much non-existing. I think that our Unicorn would be very happy to receive 1/3 requests per-second :)
The feature is disabled by default.