diff --git a/manifests/alaska/alaska.yaml b/manifests/alaska/alaska.yaml index 9bb8060..9e25b1a 100644 --- a/manifests/alaska/alaska.yaml +++ b/manifests/alaska/alaska.yaml @@ -244,8 +244,29 @@ spec: apiVersion: apps/v1 kind: StatefulSet name: deliveries - minReplicas: 4 + minReplicas: 8 maxReplicas: 20 + # Kubernetes autoscaling reacts to sustained load over ~30-60s (metric + # polling + pod scheduling + readiness delay) - it does very little for a + # burst that's over in seconds. This behavior block removes the scale-up + # stabilization delay and allows adding pods aggressively, so the cluster + # reacts as fast as the metrics pipeline allows rather than waiting extra + # cycles. minReplicas above is the main defense for bursts (baseline + # capacity that's already there before a burst starts); this just makes + # whatever additional scaling happens land as quickly as possible. + behavior: + scaleUp: + stabilizationWindowSeconds: 0 + policies: + - type: Percent + value: 100 + periodSeconds: 15 + - type: Pods + value: 4 + periodSeconds: 15 + selectPolicy: Max + scaleDown: + stabilizationWindowSeconds: 300 metrics: - type: Resource resource: @@ -330,24 +351,6 @@ spec: - name: deliveries-service port: 8000 weight: 100 - - matches: - - path: - type: PathPrefix - value: /live/api/v1/mob/orders - backendRefs: - - name: fiesta - namespace: nearle - port: 80 - weight: 100 - - matches: - - path: - type: PathPrefix - value: /live/api/v1/web/products - backendRefs: - - name: fiesta - namespace: nearle - port: 80 - weight: 100 - matches: - path: type: PathPrefix