Does the number of App instances and Zookeeper servers should be the same? I understand the requirement of 2F+1 to tolerate F failures but this is to tolerate failures of Zookeeper instances itself. But how about the number of App instances ? For example say I have 3 zookeeper servers and I have 2 instances of my APP running that are managed by zookeeper and at any given time only one instance of my App will be running in master mode and the other in standby mode. Now, I want to be able to tolerate one instance failure of my APP itself (not the zookeeper instance) such that the other instance of my APP which was running in a standby mode should be elected as a new leader. Would that work? or I must have 3 instances of my App and 3 Zookeeper servers?
What is the right configuration for number of App instances and Zookeeper servers ? Thanks!