Thread
#prefect-community
    Brian Phillips

    Brian Phillips

    3 months ago
    Can I scale an (1.0) agent to 3x replicas with the same service account / api key? Or does each replica need its own service account and api key?
    Kevin Kho

    Kevin Kho

    3 months ago
    They can use the same API key, but there is no load balancing. Itโ€™s more like there are 3 processes that poll at 10 second intervals and then whatever agent picks up the flow gets it. If itโ€™s unable to start, Lazarus may re-submit it and then run it. Are the 3 agents on different compute?
    What kind of agent is this?
    Brian Phillips

    Brian Phillips

    3 months ago
    ECS Agent in an ECS Service with 3 replicas
    With different service accounts would prefect cloud load balance across compatible agents, or is it still the first agent to poll gets the flow?
    Kevin Kho

    Kevin Kho

    3 months ago
    Still the first to poll it. A bit confused why ECS would need multiple replicas though since the execution is Serverless?
    Brian Phillips

    Brian Phillips

    3 months ago
    We've seen a single agent start to queue up scheduled flows with 1,000+ concurrent flows
    Kevin Kho

    Kevin Kho

    3 months ago
    Oh wow. Are you able to run all those if you have 3 agents? You could maybe split up the label?
    Brian Phillips

    Brian Phillips

    3 months ago
    I'm not sure ๐Ÿ™‚ just exploring how we can handle large numbers of concurrent flows right now. I only saw a single agent in the UI after I scaled to 3 replicas so wanted to check that I was actually getting additional agent bandwidth. It sounds like the answer is yes, but there is no differentiating which replica a flow landed on in the UI.
    Kevin Kho

    Kevin Kho

    3 months ago
    You do, but it just appears as one so that if you stop an agent and restart it, it will appear as the same in the UI
    So the UI treats it as the same entity but you really have three going on under the hood