Hi Shamjith,
You need a TCP loadbalancer in front of these two openfire node, like LVS, haproxy, or F5, and you client only need the IP of this loadbalancer, by the correct configuration, the loadbalancer will route request to a live server when another is down, please note under this situation, the user who is on the dead server before should relogin on the live server.
Hope this will help.