Hi Ame - all agents do is submit flow runs for execution; they are not responsible for anything more than that. Individual tasks within a Flow are handled entirely by the Flows’ executor, which could vary from Flow to Flow. This means that a single agent can easily service many many Flows without issue.
The main reasons for creating multiple agents are:
- sending flows to different execution environments through the use of labels; e.g, some flows run in one kubernetes cluster, whereas others run on a local development laptop. Each one of these environments will need an Agent responsible for submitting into it.
- scaling out: if you anticipate flooding the execution environment an agent is running in, it might be beneficial to duplicate the agent. For example, a Docker agent on a single machine will submit flows to run as Docker containers. If you anticipate having so many flows running at one time that the Docker daemon / machine running those flows will become resource starved, then you might consider creating a duplicate agent running on another machine.
The second point is much more use-case specific. For example, I can run hundreds of Flows that do nothing more than sleep on a single computer simultaneously. But if those Flows were heavy from a resource usage perspective (CPU / memory), then I might need to scale out much sooner.