Hi guys! Quick question: How many flows can an Age...
# prefect-community
m
Hi guys! Quick question: How many flows can an Agent run at a given time? Just one or can they "multitask" and run several flows at the same time?
z
Hi @Matias Godoy! The agent multitasks, so you're able to run multiple flows at the same time. 👍
m
oh, that's great
thanks!
z
Sure thing! For context, we generally have 4-5 flows running at any given time in our tenant. Enjoy!
m
Great! That was my next question. I have flows that are really light in terms of processing, but really long (around 5 hours)
Do you think I could run 8 or 10 of those with just 1 agent?
z
Hmmmm, that's a bit more of a grey area, but probably. What agent are you using?
m
right now just testing in local
with Prefect Cloud
still undecided about which type of agent to use when deploying to production environment
I'm between multiple Docker agents in an EC2 instance, or a Fargate Agent
what would you recommend?
z
It's really up to you-- I'll admit that I don't have much experience with the Fargate agent. That said, if you're deploying to a production environment, you should be able to handle 8-10 runs no problem.
@josh Any opinions on using the Fargate agent vs several Docker agents?
m
I'd like to keep it simple. My guess is that there are going to be (tops) 50 lightweight long-time flows at a given point
z
Okay, solid. If you're trying to keep it simple, my recommendation would go to a Fargate agent, as there's less complex setup required for your infrastructure there.
upvote 1
m
Great! So that would mean that I still have to create an EC2 instance for the Fargate Agent to run, but then it will spawn a Fargate task for every flow run. Is this correct?
z
Sounds correct to me! You can spin up the Fargate Agent pretty much anywhere you'd like, but an EC2 instance sounds like an intuitive choice. I'm not sure if you've seen this yet, but this might be helpful as well: https://docs.prefect.io/orchestration/agents/fargate.html#fargate-agent
m
Cool, will do that then.
Thanks again!