Jakub Hettler11/04/2020, 10:52 PM
which will run through each task in your Flow in sequence. Note that the Prefect scheduler is not involved at this level, meaning your tasks will execute as fast as your local process allows. You can gain parallelism (within a single Flow) by switching to one of Prefect’s Dask executors. These can be used to distribute work across multiple machines or multiple threads / processes. Note that each Flow can have an entirely different executor, which means Flows can spin up their own Dask clusters or share a cluster, or whatever makes sense for your work. - Agents: agents are responsible for submitting Flow runs within your infrastructure. Note that executors will then handle the job of farming out individual tasks for a given flow, and each flow may have a different executor type. You can alter the deployment platform of your flows by changing which agent types submit them (e.g., k8s agents submit work on k8s, local agents submit work in subprocesses, etc.). Combining all of this, you can easily scale out to hundreds of thousands of tasks with only a single agent and an appropriately configured executor on your flows. Multiple agents is usually desirable when you want to execute flows on different platforms, but is not necessary to handle scale. I hope that helps!