Gradually warm java application in k8s with istio

I have JVM-based applications that deliver excellent performance but need some time to “warm up” before reaching the top speed.

istio api (DestinationRule) does not support endpoint level weight, while envoy does.

I want a simple strategy: at the beginning when the pod is ready, the weight (qps) of that pod keeps a low level and increases over time

eg: lets I want the warm-up time to be 120 seconds. 2 pods have 50%-50% traffic, and when a new pod launches it will handle low traffic and increase over time and will reach 33% in 120 sec.

Let’s take an example I have one deployment where 2 pods are running and I’m going to deploy a new version for my app when a new pod came traffic is equally divided by 33% each into 3 pods the new pods are unable to handle the traffic because the application needs some time to warm up and initiate the thread to handle the heavy load the same issue is coming during HPA (horizontal pod scaling).

I need a solution to warm up the pod and handle traffic gradually for new pods based on time duration

api/destination_rule.proto at 030674c61a8b5c726bbdb15600ae6f22c58df91e · istio/api · GitHub. Is what you are looking for?

Yes, I’m looking for that kind of feature.
I’m using Istio 1.12 and I think this feature supported in 1.14.
Is it supported in 1.12?

No. It is not supported in 1.12

Ok Thanks, Can you please share the config and parameters for the warmup period?

@Anup_Dubey as you are talking about deploying a new version of your app, another solution (though maybe an overkill) is using Argo Rollouts. It gives you a lot of control over your deployments…

Istio / Destination Rule - warmupDurationSecs is the property

1 Like