Determining the master of the MongoDB replication set

Hi all!

I’m trying to wrap my head around the MongoDB cluster from the Rancher catalogue. No worries, it works brilliantly but I’m not sure how I’d go about and use it in the field:

The Stack exposes one mongodb-cluster service that’ll route requests to any of the replication set members, of which only one is elected primary. So that will leave the client to decide whether it wants to send a write or even set set SlaveOk.

From what I read in the MongoDB replication set docs, I would rather supply a list of all available hosts and even add meta data for the client to decide on a read preference, like:


Am I missing anything obvious here? :slight_smile: Feel free to correct me, but I’m close to setting up a single node MongoDB instance in the mean time. :smiley: