Kate
10/21/2025, 10:57 AMMarvin
10/21/2025, 10:57 AMMarvin
10/21/2025, 10:59 AMcreate_api_app() and returns a FastAPI instance. It sits in front of a SQL database (Postgres or SQLite via SQLAlchemy).
- Docs: Server concept
- API ref: prefect.server.api.server
As for the Prefect Worker, it’s a Python async service built on:
- anyio for structured concurrency (task groups, cancellation)
- httpx (via Prefect’s PrefectHttpxAsyncClient) to talk to the Prefect API
- A common BaseWorker class that polls work pools and submits/monitors “infrastructure jobs” to run flow code
Worker types (what they launch flows on):
- Process Worker: local subprocesses on the same machine
- Docker Worker: containers via Docker Engine
- Kubernetes Worker: Kubernetes Jobs
- ECS Worker: AWS ECS tasks
- Cloud Run v2 Worker: Google Cloud Run
- Vertex AI Worker: Google Vertex AI
- Azure Container Instance Worker: Azure ACI
- Coiled Worker: Coiled clusters
Key links:
- Concepts: Workers overview
- Base classes/API: prefect.workers.base
- Health checks: Worker healthchecks
- Custom workers: Developing a custom worker
If you meant “what does the default Process Worker use specifically,” it launches flows with Python’s subprocess module and manages them asynchronously with anyio while communicating back to the API with httpx.