-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: add Redis configuration for improved memory management #3427
feat: add Redis configuration for improved memory management #3427
Conversation
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.
Thank you so much for the PR!
Requested a change and left a question. After that I think this is good to merge but I'll also consult our SRE team to make sure.
Finally, if you could add this boilerplate to your PR description, we'd be able to merge at ease: https://github.com/getsentry/self-hosted/blob/master/.github/PULL_REQUEST_TEMPLATE.md
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3427 +/- ##
=======================================
Coverage 99.01% 99.01%
=======================================
Files 3 3
Lines 203 203
=======================================
Hits 201 201
Misses 2 2 ☔ View full report in Codecov by Sentry. |
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.
Got word from a colleague: "For a self hosted Relay itself, that config would be fine."
Note to followers: if the eviction policy kicks in, there might be data loss as Redis is not just used as a cache but also a processing queue/storage. |
thanks. @BYK |
In prod our redis are split into many different clusters and instances, so I don't know what the best setting would be for a deployment where everything is running within a single redis. It might be worth considering
|
As Sentry continues to evolve, effective resource management becomes crucial for maintaining performance and stability. This update includes configurations that will help optimize Redis's memory usage, ensuring that the system runs efficiently under varying loads.
Key Changes:
maxmemory
Directive: Configured Redis to limit its memory usage to a specified size. This prevents excessive memory consumption and helps maintain system stability.maxmemory-policy
toallkeys-lru
: This policy allows Redis to evict the least recently used keys when it reaches the memory limit, ensuring that frequently accessed data remains available while older, less-used data is removed.Thank you for considering this enhancement to improve Redis's performance within the Sentry ecosystem!