Can I scale an (1.0) agent to 3x replicas with the...
# prefect-community
b
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?
โœ… 1
k
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?
๐Ÿ˜€ 1
What kind of agent is this?
b
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?
k
Still the first to poll it. A bit confused why ECS would need multiple replicas though since the execution is Serverless?
b
We've seen a single agent start to queue up scheduled flows with 1,000+ concurrent flows
k
Oh wow. Are you able to run all those if you have 3 agents? You could maybe split up the label?
b
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.
๐Ÿ’ฏ 1
k
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
๐Ÿ‘ 1