<@ULVA73B9P> if a task fails and is retried, will ...
# marvin-ai
j
@Marvin if a task fails and is retried, will it the retry on the same machine? lets say i am using kubernetes or ecs instances
m
thought for 101.0 seconds
Short answer: Yes—when you run flows on Kubernetes or ECS with Prefect workers, a task retry happens in the same container/pod (i.e., the same “machine”) because it’s part of the same flow run process. Details and exceptions: - Same container by default: With the default task runner (ConcurrentTaskRunner), Prefect orchestrates task retries inside the running flow container. No new pod/ECS task is created for a task retry. - Distributed runners: If you’re using a distributed task runner like Dask or Ray, each retry may run on a different worker in that cluster. - Flow-level retries or infra restarts: If the entire flow run is retried (flow retries) or the container is killed/preempted and resubmitted by the worker, Prefect will start a new pod/ECS task for the new attempt—so that will be a different machine. Helpful docs: - Task and flow retries: Retries guide - Kubernetes execution (work pools/workers): Kubernetes guide - ECS execution (work pools/workers): ECS guide - Distributed runners: Dask integration