apiVersion: keda.sh/v1alpha1 kind: ScaledObject metadata: name: dify-worker namespace: dify spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: worker minReplicaCount: 1 maxReplicaCount: 3 pollingInterval: 15 cooldownPeriod: 60 triggers: - type: prometheus metadata: serverAddress: http://prometheus.observability.svc.cluster.local:9090 metricName: vllm_num_requests_waiting query: 'sum(vllm:num_requests_waiting{model_name="qwen3.6-27b"})' threshold: "10" activationThreshold: "10"