<@ULVA73B9P> is there any reference or standard pr...
# ask-marvin
t
@Marvin is there any reference or standard practice for running prefect flows in Render? Is there a worker that submits Render jobs?
m
thought for 85.7 seconds
Short answer: there’s no official Render worker/integration in Prefect 3.x, and I’m not aware of a standard “submit Render jobs” worker maintained by Prefect. A few relevant references: - Custom workers: Develop a custom worker - Docker-based execution: Run flows in Docker containers - Deployments overview: Prefect deployments What people generally do instead on Render 1. Run Prefect code directly in a Render service / cron job - Good if Render is just where your app lives - You can invoke flows there like normal Python code or via
prefect deployment run
2. Run a Prefect worker on Render - Usually a
process
worker if the Render service itself executes flow runs - Potentially a
docker
worker if your Render setup can launch Docker workloads appropriately - This is the closest thing to a “standard practice,” but it’s still more of a generic hosting pattern than a Render-specific integration 3. Use Prefect to orchestrate Render via Render’s API - Prefect flow triggers Render deploys/jobs through HTTP calls - Good when Prefect is the orchestrator and Render is the execution platform Important distinction: Prefect workers typically submit work to infrastructure Prefect knows how to target directly, like Docker, Kubernetes, ECS, Cloud Run, ACI, etc. Render is not one of the built-in worker backends. So if your question is specifically: “Is there a worker that submits Render jobs?”No official built-in one. If you really want that model, the path would be a custom worker using Render’s API: - Custom worker docs If you want, I can sketch the best architecture for Render depending on your use case, for example: - Render web service + Prefect Cloud - Render cron jobs - long-running worker on Render - Prefect orchestrating one-off Render jobs via API
t
@Marvin im happy to just use serverless prefect cloud-hosted flows maybe, but I run my migrations and db backups on prefect generally and that would mean exposing my DB directly to your servers innit
m
thought for 7.1 seconds
Yeah — if a Cloud-hosted flow needs to connect directly to your database, then your database would need to be reachable from the infrastructure running that flow. So your concern is valid. A useful distinction: Prefect Cloud is the control plane/orchestrator. Flow execution can happen in different places: 1. Cloud-hosted/serverless execution - simplest operationally - but your DB/backups/migration target would need network access from that execution environment 2. Self-hosted worker execution - Prefect Cloud still orchestrates - your code runs inside your network / VPC / private environment - this is the usual pattern for migrations, backups, internal services, private DBs So for tasks like: - DB migrations - DB backups - anything touching private infra …the common best practice is not serverless, but: - use Prefect Cloud for orchestration - run a worker somewhere close to the DB, like Render private service, a VM, Kubernetes, ECS, etc. That way: - your DB stays private - only the worker needs outbound access to Prefect Cloud - Prefect Cloud does not need inbound DB access A typical setup would be:
Copy code
text
Prefect Cloud
   -> schedules deployment
   -> worker polls for work

Worker running in your environment
   -> executes migration / backup flow
   -> connects to private DB
For Prefect 3 deployments/workers, these are the main docs: - Deployments - Workers - Run flows in Docker containers So in your case, I’d usually recommend: - Use Cloud-hosted/serverless only for flows that call public APIs or do non-sensitive orchestration - Use a self-hosted worker for DB migrations/backups If Render is where your app already lives, a reasonable pattern is: - run a small Prefect worker on Render - keep migrations/backups on that worker - optionally use serverless/cloud-hosted execution for unrelated public jobs If you want, I can suggest the simplest Render-friendly architecture for this, e.g.: - one Render service running a Prefect process worker, or - split public flows vs private DB flows into separate work pools