https://prefect.io logo
Title
g

GOWRAV TATA

05/22/2023, 10:45 AM
hello all......I have prefect running in two servers........I want to achieve HA on this servers......i.e, Prefect should run in One Server and other should stay as standby and no business logic should run.....To achieve this I pointed the Metadata DB to Postgres DB........I see none of my servers running the prefect jobs........Can someone please help @all
d

Deceivious

05/22/2023, 1:21 PM
We are running multiple prefect server in multiple machines all connected to the same db without any issues so far.
we are using Kubernetes and Helm deployment.
g

GOWRAV TATA

05/22/2023, 1:22 PM
@Deceivious In the multiple servers, are there any duplicate runs ?
d

Deceivious

05/22/2023, 1:23 PM
I havnt noticed duplicate runs
I think idempotency has been implemented for each flow run by default
g

GOWRAV TATA

05/22/2023, 1:24 PM
I have the same flow in all the servers, my aim is to run Only one run among the servers and other servers have to stay as backup....Is it achieved in your case
@Deceivious Can you let me know if you set the Concurrency Limit as 1 using the Tag
d

Deceivious

05/22/2023, 1:25 PM
I have the same flow in all the servers, my aim is to run Only one run among the servers and other servers have to stay as backup
need more context on what you mean by that
Do you mean task concurrency tag or work queue limit?
g

GOWRAV TATA

05/22/2023, 1:29 PM
Replying to Need more context..... I have same flow known as calculator() that should run for 2 minutes , which is present in 3 servers......I connected the metadata DB to same PGDB.........Now if I run the Prefect Flow calculator() in three Nodes, Only one flow be triggered in every 2 minutes.....Only one flow should run per every 2 minutes, instead of 3 flow runs from 3 servers.....there should not be 2 more duplicates flows.....Makes sense ?
d

Deceivious

05/22/2023, 1:30 PM
and how did you achieve HA ?
I have the same setup 3 server running in 3 machines [seperate nodes on Kubernetes]. I have a flow that triggers every 2 second. I dont see any duplications on my end.
g

GOWRAV TATA

05/22/2023, 1:32 PM
that was my question 🙂.......i want to run 3 servers at the same time , but only one server has to do the job and other has to be as backup.....Can that be achieved....You previously mentioned idempotency is maintained between flows.......Can you relate that to my ask
d

Deceivious

05/22/2023, 1:36 PM
Like i said , In my case I dont have duplicate flows running. So yes it is possible atleast in my case.
g

GOWRAV TATA

05/22/2023, 1:36 PM
okay