How to load balance mongodb replica cluster
You don't use ha-proxy. 

Every node what connects to this replica set should have mongodb://mongo1,mongo2/?replicaSet="yourRS" -connection string, what tells which nodes are on that replicaset.. String don't need always list all nodes, most of them is enough, because Application can "ask" where current primary is located.