I've got a newbie question that I haven't been abl...
# ask-community
o
I've got a newbie question that I haven't been able to figure out from the documentation. I'd prefer to use the Cloud backend. Since the code for flows isn't stored on the Cloud backend, are there approaches one can use to avoid having to run a machine 24/7? (At this point I'm anticipating only having simple flows that run once a day.) The closest I've seen is this article which talks about using Docker, AWS ECR, AWS Batch, and Cloudwatch to avoid a dedicated machine. However, I'm not sure if the author was using Prefect Cloud or Server. Plus, if one sets up Cloudwatch to fire off events to AWS Batch, then I'm not understanding the benefit of using Cloud anymore.
k
Hey @Open-Issue Prefect Team 1, so with Prefect you need to have an agent that is always on and a long running process. The agent is the one responsible for polling Prefect Cloud every 10 seconds, and seeing if there are flows to run. So you always need an agent on your infrastructure to trigger the flows that is on. But this agent doesn’t have to be a big machine. It can be a smaller VM that offloads the compute to a serverless service. For example, we have the AWS ECS agent that spins up jobs on ECS when it receives them. @Maikel Penz just tagging cuz your article is here.
o
Thanks, that's very helpful to know.
If you read this thread Maikel and have time to respond, I'd love to know whether you were running Prefect Cloud or Server in the use case described in your article.
k
I read the disclaimer. He was on Server*, which is why I guess he architected this way.
o
Thanks, good to know.
m
Hey ! That article was our first Prefect Implementation and at that time Prefect Cloud was not a thing (or it was on very early days). Once Prefect Cloud came up we moved away from that as it was taking too much of our time + the engineering effort. At TradeMe it didn’t make sense to manage that on our own considering the number of users we were getting.
o
Hey, thanks so much for that info, Maikel!