🔧 DevOps

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

Edit this page

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey