tiproxy: revive graceful scaling-in pods when scaling out TiProxy#6964
tiproxy: revive graceful scaling-in pods when scaling out TiProxy#6964djshow832 wants to merge 19 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6964 +/- ##
==========================================
+ Coverage 39.53% 39.56% +0.02%
==========================================
Files 430 433 +3
Lines 24378 24492 +114
==========================================
+ Hits 9638 9690 +52
- Misses 14740 14802 +62
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Background
Scaling in a TiProxy pod may take 24h. If the operator assigns a new pod when scaling out, there may be many extra pods in a frequent auto-scaling workload, which is a waste.
The goal is to revive graceful scaling in pods when scaling out with the best effort.
Changes
The restarting/upgrading pods can't be revived, so the steps should be different from those of scaling in pods.
Graceful scale-in steps:
spec.offline=true. NodeletionTimestampbecause it may be reused.graceful-shutdown-begin-timeon the pod.Scale-out steps:
spec.offline=falseand cleargraceful-shutdown-begin-time.Follow-ups in HPA:
graceful-shutdown-begin-timewhen calculating the average CPU/memory/network.Notes:
Other refactors:
IsStore()toSupportsStore().E2E tests