Queue-based autoscaling