title: MongoDB How to know Primary DB server ip in a replica set?
body: <p>I am running mongodb replica set on 3 nodes , lets their ip's  are 192.168.1.100 , 192.168.1.101,192.168.1.102</p>
  
  <p>now in current replica set 192.168.1.100 is primary and 192.168.1.101 and 192.168.1.102 are secondary , my application connect with 192.168.1.100 for write operations .now after 2 days 192.168.1.100 is down and mongodb select 192.168.1.101 as primary . how my application knows 192.168.1.101 is primary . </p>
  
  <p>is their is any floating ip concept in mongodb so that no manual work needed when primary server switched in a replica set .</p>