Tom Han
09/10/2025, 8:36 PMMarvin
09/10/2025, 8:36 PMMarvin
09/10/2025, 8:40 PMprefect work-pool set-concurrency-limit <your-pool> 200
- Use tag-based or global concurrency limits to protect shared systems:
prefect concurrency-limit create "heavy" 50
- Docs: Global concurrency limits, Tag-based concurrency limits, Work pool CLI
- Worker scaling and execution model
- Run multiple workers across nodes and use a push-based work pool that provisions per-run infrastructure (Kubernetes, ECS, Docker) so the worker process isn’t your bottleneck.
- Start workers targeting your pool/queue(s):
prefect worker start -p <your-pool> -q <optional-queue>
- Work pools concept: Work pools in Prefect 3.x
- Backlog planning
- If each run takes ~2 hours, the drain time is roughly (queued_runs / max_parallelism) * 2h. For example, 20,000 runs at 200-way parallelism ≈ 200 hours (~8.3 days).
- If possible, submit runs in batches or schedule them across a time window to avoid sudden spikes in DB/API load and underlying cloud API rate limits.
- Observability and retention
- Keep log verbosity and result storage reasonable to avoid unnecessary DB and object-store load.
- For OSS, configure DB retention policies and vacuum/analyze to keep performance steady.
- Known caveat (ECS push at very high volumes)
- If you plan to submit hundreds/thousands of runs rapidly to an ECS push work pool, watch for cloud API rate limits and queueing latency. There’s an open report describing slow transitions to PENDING in a high-volume ECS push setting: Issue #18877.
What we don’t publish: a fixed numeric “max queue size.” In practice, 20k queued runs is fine as long as your control plane (Cloud or OSS Postgres) and workers are sized for it.
A few quick questions to tailor guidance
- Are you on Prefect Cloud or OSS?
- Which infrastructure do you want workers to launch (Kubernetes, ECS, Docker, VMs)?
- How fast will you enqueue the 20k runs, and what max parallelism do you want?
- Any per-tenant or per-endpoint fairness requirements we should enforce with concurrency limits?
If you share this, I can suggest exact pool types, concurrency settings, and a worker layout to match your 2-hour heavy workloads.Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by