Bart Shappee
10/03/2025, 12:40 PMMarvin
10/03/2025, 12:41 PMMarvin
10/03/2025, 12:43 PMprefect server start --ui
(services like the scheduler/late-run detector are on by default; you can force them on with --scheduler --late-runs if you prefer)
- Additional replicas:
prefect server start --ui --no-services
- Run multiple workers in a single container (advanced)
- Replace the default command with Gunicorn managing multiple Uvicorn workers:
gunicorn -k uvicorn.workers.UvicornWorker -w 4 -b 0.0.0.0:4200 'prefect.server.api.server:create_app()'
- This will utilize multiple CPU cores within one task. Ensure your environment variables (e.g., database connection URL) are set so the app can start normally.
Other considerations:
- The database is usually the bottleneck. Make sure your Postgres instance has sufficient CPU/IO and connection capacity for whichever scaling approach you choose.
- The server is I/O heavy; you may get more headroom by scaling replicas behind an ALB rather than increasing cores on a single process.
Docs:
- Self-hosted guidance: Prefect 3.x self-hosted docs
- Uvicorn deployment notes: Uvicorn deployment
If you share how you’re starting the container (entrypoint/command and env) and your DB setup, I can suggest a concrete ECS task definition and health check config.