fix(sentry): limit redis to 1 replica and add resource limits #3462
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Redis was configured to run 3 replicas + 1 master, as this is the default for the upstream Redis chart that the Sentry chart utilizes. Newer versions of the Sentry chart than we're running right now override the default to 1 replica.
Further, by default no resource limits are applied to the Redis instances
As a result, we have 4 Redis instances running with unlimited memory which they will gradually use as much as they can over time. Our cluster is configured to autoscale between 3 and 6 nodes. The 4 redis instances would fight to eat all the memory on the 3 nodes. Eventually GCP's autoscaler would kick in and add a 4th node and move one of the Redis instances there. The fresh Redis instance we start off with low memory usage, and then the autoscaler would remove the 4th node and shove everything back into 3 nodes. The cycle continues
I suspect we don't really need 3 Redis replicas running for our Sentry instance and am going to try setting it to 1 replica per the Sentry helm chart's new default. If we see performance issues with Sentry we can scale it back up. I'm also applying a 2-3gb memory limit on the Redis replicas
Type of change
How has this been tested?
Opening this pull request will generate a diff
Post-merge follow-ups