An agent runs for 10 minutes on average. Deployments happen hourly with a 30-second grace period. What is the probability of a given run being interrupted by a deployment?
- About 0.5%, because the 30-second grace period is short relative to the 10-minute runtime and most runs complete well before any deployment window opens
- About 5%, because Kubernetes rolling deployments only affect 1 in 20 pods per deployment cycle, and the agent has a 1-in-20 chance of being selected for termination, which is the standard recommendation for production autonomous agent deployments at enterprise scale
- About 50%, because deployments are equally likely to happen at any point during the agent's 10-minute execution window, giving a coin-flip chance of interruption
- About 17%, computed as agent_runtime divided by deploy_interval, because any run overlapping the deployment window will be interrupted regardless of how much progress it has made
Why
The probability of a given agent run being interrupted by a deployment is approximately agent_runtime divided by deploy_interval. With a 10-minute runtime and hourly (60-minute) deployments, this is 10 divided by 60 equals approximately 0.167 or 17%. This calculation assumes the agent run starts at a uniformly random time within the deployment interval. The 0.5% estimate drastically underestimates the overlap probability. The 50% estimate would require either a 30-minute runtime or 20-minute deployment intervals. The 5% estimate incorrectly assumes only one pod is affected per deployment, but Kubernetes rolling deployments cycle through all pods. With a 30-second grace period, an agent mid-execution receives SIGTERM and has 30 seconds to complete. If the in-flight LLM call takes 45 seconds, the pod is killed by SIGKILL when the grace period expires, losing all in-flight state. In a cluster with 50 agent workers and daily deployments, this hits 2-5 agents per deploy. Without durability via event sourcing or checkpointing, each interrupted run loses all completed work.