Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:PrefectHQ Prefect Worker Configuration

From Leeroopedia


Metadata
Source Repo: Prefect
Source Doc: Prefect Workers
Domains Deployment, Orchestration
Last Updated 2026-02-09 00:00 GMT

Overview

A CLI-based pattern for setting up Prefect work infrastructure including Global Concurrency Limits, work pools, and workers with unique identities.

Description

Worker Configuration covers the infrastructure setup needed for production Prefect deployments with per-worker concurrency control. It involves three CLI operations:

  • Creating GCLs with worker-specific names and slot limits
  • Creating work pools that define execution environments
  • Starting workers with unique identities and flow run limits

Workers poll work pools for scheduled flow runs and execute them as subprocesses. The WORKER_ID environment variable provides worker identity for per-worker GCL scoping.

Usage

Use this pattern when deploying Prefect flows to production with multiple workers that need independent resource limits. This is the infrastructure setup phase before flow deployment.

Theoretical Basis

The Worker Pool pattern from distributed computing. Work pools define execution environments; workers register with pools and compete for work items (flow runs). Per-worker GCLs add resource-level concurrency control on top of the flow-level concurrency provided by worker --limit.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment