With a sharded cluster, what is best: CNAME round-robin or seed list


#1

Hi there,

I use Meteor with a MongoDB sharded cluster (with no oplog tailing, and slight modifications to Meteor to disable unique indices and allowing multiple servers in seed list with no master).

What is best:

  • use CNAME round-robin to ‘load-balance’ (and failover?) between mongos, or
  • use multiple mongos servers in the connection string

Olivier


#2

Congrats on getting the cluster sharded. Last big data project I worked on, we only got the two replica sets up, but didn’t get the control servers up and going. But we were leaning towards CNAME round-robin, from a devops perspective. Easier to swap out servers during maintenance if they have that CNAME abstraction in there.


#3

Hi Abigail and thanks for the reply. Do you confirm that multiple CNAME is well handled by mongo’s driver in case of failover?


#4

It’s been a year or so since I was last working in this area, but as I recall, our initial tests were that it worked. I wouldn’t say that we did extensive or exhaustive testing; so there may edge cases that I don’t know about. But tentatively, yes; as I recall, we installed CNAME aliases, and everything worked just fine. It was not having a DNS abstraction layer that was causing problems with cluster management, and getting the CNAMES in place was a bit of a logistical headache with our hosting provider, and something we considered a bit of a milestone. Shortly after we got them in place, and did a few up/down tests, confirmed everything was working, I left the project. But CNAMES were what we had identified as the preferred approach.


#5

Great, thanks for your feedback!