New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis Model Cache (PROJQUAY-788) #444
Conversation
3a9125a
to
fc2e44a
Compare
fc2e44a
to
d2d11be
Compare
Rebased with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using this model cache implementation, the Redis dependency changes from being low priority (effectively ephemeral) to being critical (and should be HA).
It depends. Most deployment aren't large enough or don't generate enough traffic to cause a thundering herd issue, and clearing the cache wouldn't be an issue.
@alecmerdler The current ticket linked is the wrong one. It should be PROJQUAY-788 |
d2d11be
to
086691d
Compare
086691d
to
5764148
Compare
37f3cc7
to
ea28362
Compare
@alecmerdler Like you previously mentioned, I think we should make it so that two requests can't write to the same key at once (grab a Lock). |
ea28362
to
7e7ac79
Compare
1aba288
to
ee26716
Compare
@kleesc Ready for another review after being rebased with the |
1933971
to
d73b74b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm seeing slow pushes (stuck in |
ae74273
to
48caeed
Compare
Adds implementation of DataModelCache interface backed by Redis. All containers in a Quay cluster deployment will share a single model cache, rather than each container using its own cache. Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds implementation of DataModelCache interface backed by Redis. All containers in a Quay cluster deployment will share a single model cache, rather than each container using its own cache. Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
Adds implementation of DataModelCache interface backed by Redis. All containers in a Quay cluster deployment will share a single model cache, rather than each container using its own cache. Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
Issue: https://issues.redhat.com/browse/PROJQUAY-788
Changelog: Add model cache implementation backed by Redis.
Docs: N/a
Testing: Add the following section to
config.yaml
:Details: Adds an implementation of the model cache which uses Redis. The goal is when deploying a cluster of Quay app containers, they will all use a shared Redis instance for caching requests (as opposed to a per-container memcache), which will reduce load on the database for expensive queries. Enhancements proposal.
NOTE: When using this model cache implementation, the Redis dependency changes from being low priority (effectively ephemeral) to being critical (and should be HA).
NOTE: The Quay container will still have
memcached
running even if not being used, unless we modify the container entrypoint to read theconfig.yaml
.Blocked by #745