How do you scale a workload based on SQS queue depth on EKS?
IntermediateProductionAutoscaling, Capacity & Cost
Answer
Use KEDA's aws-sqs-queue scaler with a ScaledObject, authenticating through Pod Identity or IRSA. Target messages per replica from measured throughput, set minReplicaCount (0 if latency allows), cooldownPeriod, and maxReplicaCount bounded by downstream capacity so a backlog does not overwhelm the database.
triggers:
- type: aws-sqs-queue
metadata: { queueURL: https://sqs.ap-south-1.amazonaws.com/123456789012/jobs, queueLength: "20", awsRegion: ap-south-1 }
More on Autoscaling, Capacity & Cost
How do you right-size requests and limits?BeginnerWhy does HPA need accurate CPU requests?BeginnerWhat are Spot instances good for on Kubernetes?BeginnerHow do you reduce Kubernetes cost quickly?BeginnerWhat is metrics-server and what does it not do?BeginnerWhat is a good default for the node size and why?Beginner