How would you choose between Prefect Cloud and a self-hosted Prefect server for a team?
answer
- execution is the same either way
- the difference is who runs the control plane
- what actually crosses the boundary is metadata
- multi-team needs identity, not just a firewall
- two pool types exist on only one side
basics
~20 sBoth run the same orchestration API and the same hybrid execution model, so the decision is about who operates the control plane. Self-hosting means you run the API, database and UI; Cloud adds hosted availability, workspaces, access control and serverless push and managed work pools.
solid answer
~50 sThe flow code, the work pools and the workers are identical either way — execution stays in your infrastructure under both, with workers polling outbound. What differs is the control plane. **Self-hosted** (`prefect server start`, backed by Postgres) is free and keeps all metadata inside your perimeter, but you own uptime, upgrades, backups, scaling the API under load, and putting authentication and TLS in front of it. **Prefect Cloud** removes that operational burden and adds multi-tenant structure — workspaces, RBAC and SSO, audit logging — plus execution options that only exist there: **push work pools** that submit runs to serverless infrastructure with no worker, and **managed** pools that run on Prefect's own infrastructure. Decide on operating capacity, whether run metadata and logs may leave your perimeter, and whether you need per-team isolation. A single team with a platform group and a strict data-residency rule self-hosts happily; several teams needing isolation and no ops budget should not.
code
bash · 7 lines# self-hosted control plane, backed by Postgres
export PREFECT_API_DATABASE_CONNECTION_URL="postgresql+asyncpg://prefect:...@db:5432/prefect"
prefect server start
# workers and CI point at whichever control plane you chose
export PREFECT_API_URL="http://prefect-api.internal:4200/api"
prefect worker start --pool k8s-prodgo deeper
Know that both options run the same Prefect API and that your flows execute on your own infrastructure either way; Cloud is the hosted version of the control plane.
Be able to say concretely what self-hosting entails — running the API and UI against Postgres, plus upgrades and access control — and what only Cloud offers, such as workspaces and push work pools.
Argue the operational case with evidence: what an orchestrator outage does to running pipelines, what backups and upgrades cost, and what metadata actually crosses the boundary.
Own the decision and its reversibility — data-residency constraints, whether you have the platform capacity, multi-team isolation needs, and keeping deployment definitions in version control so the control plane stays swappable.
## Start with what does not change People frame this as a security question and get it backwards. Under both options, Prefect's **hybrid model** holds: your flow code lives in your repository or image registry, your workers run in your infrastructure and poll the API outbound, and the data your flows touch never passes through Prefect. Results, when persisted, go to storage you configure. What the control plane sees is orchestration metadata — deployment definitions, run states and timings, parameters, tags, and logs your flow emits through the Prefect logger. That last list is the actual privacy question, and it is a real one: parameters and log lines can carry sensitive values if your code puts them there. But it is a much narrower question than "does my data go to a vendor". ## What self-hosting means operationally `prefect server start` runs the API and UI. For anything beyond a laptop you point it at **Postgres** rather than the default embedded database, and then you own the usual list: high availability for the API, connection pooling and sizing under a busy scheduler, backup and restore of the orchestration database, version upgrades coordinated with worker and client versions, TLS termination, and authentication in front of the UI and API. The open-source server does not come with per-user identity, roles or SSO out of the box, so multi-team access control is something you build around it — typically a reverse proxy and network boundaries, which is coarse. The honest cost is not the cluster resources; it is that someone must be on call for the orchestrator itself. An orchestrator outage does not corrupt anything — workers just cannot fetch work, and runs go `Late` — but it is a stop-the-world event for every pipeline. ## What Cloud adds - **A managed control plane.** Availability, upgrades and the database are Prefect's problem. - **Workspaces** — hard boundaries between teams or environments, with deployments, pools and secrets scoped inside one. - **RBAC, SSO and audit logging** — identity-level access control, which the open-source server does not provide natively. For an organization with compliance obligations this is often the deciding item. - **Push work pools** — Prefect Cloud submits runs directly to serverless compute (Cloud Run, ECS, ACI, Modal) using credentials you store, with **no worker to run**. This inverts one part of the hybrid model: you hand Cloud the ability to launch workloads in your account. That tradeoff is the thing to name explicitly in an interview. - **Managed work pools** — Prefect runs the flow on infrastructure it operates. Fastest possible start, least control, and now the code does execute outside your perimeter. - **Service accounts and API keys** with lifecycle management for CI. ## How to actually decide Ask four questions in order. **1. Can metadata and logs leave the perimeter?** If a regulator or an internal rule says no, self-hosting is the answer and the rest is moot. If you almost qualify, the mitigation is disciplined: never log secrets, never pass credentials as flow parameters, reference blocks instead. **2. Do you have a platform team?** Running a stateful service well is a standing commitment. A data team of four with no platform support that self-hosts will discover the orchestrator has become their most fragile dependency. A company already operating Postgres and Kubernetes fleets absorbs it easily. **3. How many teams share it?** One team, one environment: network-level isolation on a self-hosted server is adequate. Several teams that must not see or trigger each other's deployments: you need workspaces and role-based access, and rebuilding those around an open-source server is not a good use of anyone's quarter. **4. What execution model do you want?** If serverless push pools or managed execution are the reason you chose Prefect — no worker fleet at all — that decides it, because those are Cloud-only. If you are running Kubernetes workers anyway, the marginal benefit shrinks. ## Migration and hedging The reassuring part is that the choice is reversible in the direction that matters. Deployments are defined in `prefect.yaml` or Python in your repository, code lives in git or images, and work pools are recreated with a couple of CLI commands. Moving control planes means re-running your deployment step against a different `PREFECT_API_URL` and restarting workers; what you lose is historical run data, not capability. Keeping deployment definitions in version control rather than clicking them into a UI is what preserves that option — which is the general principal-level point: pick for today's operating capacity, and keep the artefacts portable so the decision can be revisited. ## Version note Describes Prefect 3.x. Feature availability on Cloud tiers changes over time; verify current specifics rather than quoting a plan.
- What actually leaves your infrastructure when you use Prefect Cloud?Orchestration metadata: deployment definitions, run states and timings, parameters, tags, and any logs your flow emits through the Prefect logger. Flow code stays in your repository or image, and the data your flows read and write never transits Prefect. The real exposure is self-inflicted — secrets logged or passed as parameters — so reference blocks instead.
- A push work pool needs no worker. Why might you still refuse one?Because it inverts the hybrid model: Prefect Cloud holds credentials that let it launch workloads in your cloud account. For a regulated environment, that outbound-only, no-inbound-trust property of worker-based pools is exactly what security signed off on. Push pools also constrain you to the supported serverless runtimes and their limits.
- What would you insist on before letting a team self-host Prefect in production?Postgres rather than the embedded database, backups with a tested restore, authentication and TLS in front of the API and UI, a version-upgrade plan coordinated with workers and clients, and a named owner on call. An orchestrator outage stops every pipeline at once, so it needs the same operational rigour as any shared stateful service.
- How hard is it to move from a self-hosted server to Prefect Cloud later?Mechanically light if your deployments are defined in prefect.yaml or Python in git: point PREFECT_API_URL and an API key at the new control plane, recreate work pools, re-run the deployment step, restart workers. What does not transfer is historical run data. Keeping definitions in version control rather than in a UI is what keeps this cheap.
saying these in an interview costs you the question
- Claims flow code and data are sent to Prefect Cloud for execution
- Treats self-hosting as free, ignoring database, upgrades and on-call
- Assumes the open-source server ships SSO and role-based access control
- Picks Cloud purely for the UI, without naming workspaces or access control
- Thinks push work pools work the same on a self-hosted server