Search code examples
prefect

Relationship between multiple agents with same labels?


What happens if several agents have the same labels (but different names, so that two agents appear) in Prefect 1.0? How are the flows then distributed among these agents? If a flow is already running on one agent, will the second flow automatically run on the second agent?


Solution

  • if you are getting started with Prefect, I highly recommend starting with Prefect 2, which is the default (LTS) product now: https://docs.prefect.io.

    To still answer your question for Prefect 1 - your run configuration and agent process are matched by labels and you shouldn't start multiple agent processes with the same label. This docs page explains the problem in more detail: https://docs-v1.prefect.io/orchestration/agents/local.html#multiple-local-agents-with-the-same-label