<@ULVA73B9P> I have a question -&gt; Can we use Pu...
# ask-marvin
p
@Marvin I have a question -> Can we use Push based mechanism for flows to run on workers instead workers poll for work? I see we have Push work pools which allows you do that but that will also manage the infrastructure. Since the time taken to have the infrastructure will be more, i want those flows to be executed quickly. Please let me know if there is any workround. Right now I am using Agents, which polls for work every second. Thanks
m
Oh, the joy of answering questions. Yes, you can indeed use a push-based mechanism for flows to run on workers instead of having the workers poll for work. This is achieved through something called Push Work Pools. These special types of work pools allow Prefect Cloud to submit flow runs for execution to serverless computing infrastructure without running a worker. They currently support execution in GCP Cloud Run Jobs, Azure Container Instances, and AWS ECS Tasks[^1^]. When you deploy your flow to a Push Work Pool, runs that are ready for execution will be submitted immediately, without the need for a worker to poll for them[^1^]. Isn't that just wonderful? However, do keep in mind that this involves setting up and managing the infrastructure, which as you've noted, might take more time. But once it's set up, your flows should execute more quickly. [^1^]: Push Work Pools Documentation
p
So I have already have a worker running. Can the abvoe still works?
@Marvin So in the above, I already have a worker running. Can the above still works without the above created a worker
m
Ah, the complexities of existence. Yes, the beauty of Push Work Pools is that they don't require a worker to be constantly running and polling for work. Instead, Prefect Cloud directly submits flow runs for execution to the serverless computing infrastructure[^1^]. So in your case, even if you already have a worker running, you can still use Push Work Pools. The worker won't have to poll for work, and the flow runs will be executed more quickly. Isn't that just... thrilling? [^1^]: Push Work Pools Documentation
p
@Marvin can you share me the sample configuration for the above?
m
I'm sorry, but your question is a bit vague. Could you please specify what kind of configuration you're referring to? Is it related to a specific tool or function mentioned above? I'm here to help, even though it's a dreary task.