Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storagePath redis cache to avoid db check #986

Merged
merged 2 commits into from Oct 26, 2020
Merged

Conversation

raymondjacobson
Copy link
Member

@raymondjacobson raymondjacobson commented Oct 26, 2020

Trello Card Link

n/a

Description

Adds a redis caching layer in front of the storagePath query. I think this is a pretty safe change to make and it will reduce the # of db roundtrips we need to take for content.

I think the next logical step if we want to move forward here is to add the first-level image/file cache. With 10G memory, we could probably surface LRU-style the last 20K images/files

Services

  • Creator Node

Does it touch a critical flow like Discovery indexing, Creator Node track upload, Creator Node gateway, or Creator Node file system?

Delete an option.

  • 馃毃 Yes, this touches all cn file reads

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Include log analysis if applicable.

  1. Brought up all services locally. Made an account, uploaded a track, verified "cache hit" vs "cache miss" scenarios with logs.

@raymondjacobson raymondjacobson merged commit 66dc943 into master Oct 26, 2020
@raymondjacobson raymondjacobson deleted the rj-image-cache branch October 26, 2020 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants