Matias Godoy

    Matias Godoy

    2 years ago
    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?
    Zachary Hughes

    Zachary Hughes

    2 years ago
    Hi @Matias Godoy! The agent multitasks, so you're able to run multiple flows at the same time. 👍
    Matias Godoy

    Matias Godoy

    2 years ago
    oh, that's great
    thanks!
    Zachary Hughes

    Zachary Hughes

    2 years ago
    Sure thing! For context, we generally have 4-5 flows running at any given time in our tenant. Enjoy!
    Matias Godoy

    Matias Godoy

    2 years ago
    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?
    Zachary Hughes

    Zachary Hughes

    2 years ago
    Hmmmm, that's a bit more of a grey area, but probably. What agent are you using?
    Matias Godoy

    Matias Godoy

    2 years ago
    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?
    Zachary Hughes

    Zachary Hughes

    2 years ago
    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?
    Matias Godoy

    Matias Godoy

    2 years ago
    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
    Zachary Hughes

    Zachary Hughes

    2 years ago
    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.
    Matias Godoy

    Matias Godoy

    2 years ago
    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?
    Zachary Hughes

    Zachary Hughes

    2 years ago
    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
    Matias Godoy

    Matias Godoy

    2 years ago
    Cool, will do that then.
    Thanks again!