Adjust backend-listen HPA for cost saving#5640
Merged
Conversation
Contributor
Greptile SummaryReduces the backend-listen HPA replica bounds for cost optimization, leveraging the new WebSocket connections metric (
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[WS Connection Metric] -->|activeConnectionsPerPod: 20| B[HPA Decision]
B -->|Below threshold| C[Scale Down]
B -->|Above threshold| D[Scale Up]
C -->|stabilization: 600s\nselectPolicy: Min| E["Min: 20 replicas (was 26)"]
D -->|stabilization: 120s\nselectPolicy: Max| F["Max: 40 replicas (was 50)"]
E --> G[Cost Savings]
F --> H[Handle Traffic Spikes]
Last reviewed commit: 48e0833 |
| enabled: true | ||
| minReplicas: 26 | ||
| maxReplicas: 50 | ||
| minReplicas: 20 |
Contributor
There was a problem hiding this comment.
PR description does not match actual change
The PR description states minReplicas: 26 -> 22, but the actual diff shows 26 -> 20. Please update the PR description to reflect the correct value, or update the code if 22 was the intended minReplicas. A 6-replica difference (20 vs 22 vs 26) matters for capacity planning on a WebSocket-heavy service.
Collaborator
|
lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change:
Thanks to the new backend-listen WS connections metric, now we can adjust the HPA with the real WS connections in backend-listen for cost optimization