Yes, you can horizontally scale both the Prefect server and Prefect workers.
1.
Prefect Server: You can self-host a Prefect server on Kubernetes using the
prefect-server Helm chart. This allows you to manage multiple instances, which can be useful for scaling and high availability.
2.
Prefect Workers: Workers are designed to poll work pools for new runs to execute. You can have multiple instances of workers, each corresponding to different execution environments. This setup allows you to handle more flow runs by distributing the workload across multiple worker instances. More details on workers can be found
here.
If you are using Prefect Cloud, it provides additional features such as RBAC and SSO that are not available in self-hosted versions, but the horizontal scaling principles remain similar.
For more information on setting up and scaling Prefect infrastructure, you can refer to the
self-hosting documentation and
worker infrastructure concepts.