ื“ืœื’ ืœืชื•ื›ืŸ ื”ืจืืฉื™

Auto-Scaling Guide

Configure auto-scaling for Ever Gauzy deployments.

Kubernetes Horizontal Pod Autoscalerโ€‹

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: gauzy-api-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: gauzy-api
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80

Scaling Strategiesโ€‹

StrategyTriggerBest For
CPU-basedCPU > 70%Compute-heavy API
Memory-basedMemory > 80%Data processing
Request-basedRPS > thresholdTraffic spikes
Custom metricsQueue depth, latencyAdvanced scaling

Database Connection Scalingโ€‹

When scaling API pods, adjust connection pool:

max_connections = (replicas ร— pool_size) + buffer
ReplicasPool/PodMax DB Connections
22050
520110
1020210

Docker Swarm Scalingโ€‹

docker service scale gauzy-api=5