-
Notifications
You must be signed in to change notification settings - Fork 34
[Scalability] Enable Horizontal Pod Autoscaler (HPA) for Alcor deployment #679
base: master
Are you sure you want to change the base?
Changes from 1 commit
24b9b76
08ec421
598f3aa
3f44da0
72f9591
c26c1b2
ed7a10e
f4097e1
1485704
29ea149
7e92e06
2c5e59c
dabc518
ff6d28c
7420d5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,26 @@ spec: | |
# if minReplicas is less than Deployment replicas value, it may cause scale down | ||
minReplicas: 5 | ||
maxReplicas: 10 | ||
behavior: | ||
scaleDown: | ||
# Indicates that the stability window considers the expected state of the past (here within 300 sec) to prevent expansion and contraction | ||
stabilizationWindowSeconds: 300 | ||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
# The autoscaler will choose the strategy that affects the minimum number of Pods | ||
selectPolicy: Min | ||
scaleUp: | ||
stabilizationWindowSeconds: 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The value of stabilizationWindowSeconds differs in the ScaleUp and ScaleDown policies. Is it the best practice to set stabilizationWindowSeconds = 0? Does 0 meaning that the autoscaler will always respond to changes immediately? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The stabilization window is used to restrict the flapping of replicas when the metrics used for scaling keep fluctuating. For example, It should scale up the pods immediately if need. and we set up When current metrics indicate that we could scale down the pods, HPA will consider the state of past within 300 seconds to determine if we can scale down now. |
||
policies: | ||
- type: Percent | ||
value: 100 | ||
periodSeconds: 15 | ||
- type: Pods | ||
value: 4 | ||
periodSeconds: 15 | ||
selectPolicy: Max | ||
metrics: | ||
# Set the average usage rate of the cpu, scale up if it exceeds 50 | ||
- type: Resource | ||
|
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.
Does periodSeconds mean the time interval to check the percentage number?
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.
Not really, periodSeconds: 15 above means it can reduce pods by up to 100% in 15 seconds.