Balancerd defaults are undersized for production workloads and cannot scale to handle traffic spikes.
# Example Balancerd HPA config
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: balancer
namespace: mz-balancer
spec:
behavior:
scaleDown:
policies:
- periodSeconds: 15
type: Percent
value: 100
selectPolicy: Max
stabilizationWindowSeconds: 1800
scaleUp:
policies:
- periodSeconds: 15
type: Pods
value: 4
- periodSeconds: 15
type: Percent
value: 100
selectPolicy: Max
stabilizationWindowSeconds: 180
maxReplicas: 10
metrics:
- resource:
name: memory
target:
averageUtilization: 50
type: Utilization
type: Resource
- resource:
name: cpu
target:
averageUtilization: 50
type: Utilization
type: Resource
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: balancer
Problem
Balancerd defaults are undersized for production workloads and cannot scale to handle traffic spikes.
Solution