Web interface and Load Balancer

See the following post about how the primary node is chosen.

also i couldn’t get any info about setting up dedicated database server except for adding the ip in ido->mysql.conf…Could you also please help with this

you have read through the documentation? because it does discuss this, if you have 2 databases, you setup will be more complicated, because you need to synchronize the databases. (HA dual master with local database or Implementing HA Master-Master setup - #4 by log1c)