Istio version: 1.18
I’m trying to establish slow-start for a kubernetes pod that has just been added. The pod is a member of a deployment which has a Service and VirtualService forwarding requests to the pods.
When a new pod starts, it will be a bit sluggish as it gets its connections pools set up so I’d like to have only minimal traffic sent to it at first ramping up to evenly balanced.
Given the following Serve and VirtualService:
apiVersion: v1
kind: Service
metadata:
name: warm-start-test
namespace: adrian-warm-start-test
labels:
app: warm-start-test
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: warm-start-test
sessionAffinity: None
type: ClusterIP
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: warm-start-test
namespace: adrian-warm-start-test
labels:
app: warm-start-test
spec:
gateways:
- istio-system/secure-istio-gateway
hosts:
- warm-start-test.example.com
http:
- name: wiremock
route:
- destination:
host: warm-start-test.adrian-warm-start-test.svc.cluster.local
port:
number: 8080
I tried creating the following DestinationRule and EnvoyFilter to configure the warm-start:
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: warm-start-test
namespace: adrian-warm-start-test
labels:
app: warm-start-test
spec:
exportTo:
- .
host: warm-start-test.example.com
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
warmupDurationSecs: 5m
workloadSelector:
matchLabels:
app: warm-start-test
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: warm-start
namespace: adrian-warm-start-test
spec:
workloadSelector:
labels:
app: warm-start-test
configPatches:
- applyTo: CLUSTER
match:
cluster:
name: outbound|8080||warm-start-test.adrian-warm-start-test.svc.cluster.local
context: GATEWAY
patch:
operation: MERGE
value:
lb_policy: ROUND_ROBIN
round_robin_lb_config:
slow_start_config:
aggression:
default_value: 0.5
min_weight_percent:
value: 0.5
slow_start_window: 5m
- applyTo: CLUSTER
match:
cluster:
name: inbound|8080||warm-start-test.adrian-warm-start-test.svc.cluster.local
context: GATEWAY
patch:
operation: MERGE
value:
lb_policy: ROUND_ROBIN
round_robin_lb_config:
slow_start_config:
aggression:
default_value: 0.5
min_weight_percent:
value: 0.5
slow_start_window: 5m
But these have no effect, either together or separately.
Can someone help me get this working?