I am building a distributed app in which a set of processes (running on separate machines) are working together. Each process works on its own set of "resources" (and there is no sharing of resources among the processes). When the app starts, I need to distribute the pool of resources among the processes so that they can work independently. In order to do the resource distribution, I am considering using Apache Curator's Leader Election recipe.
Once a process is chosen as leader, it will do the resource distribution and then the remaining processes can work on their assigned resources. While the leader is doing the work, other processes have to be "blocked". What is the curator behavior for the non leader processes? Do they immediately get a failure from the leader election api or they get blocked?