Guns
Guns

Reputation: 2728

MongoDB Issue with Compose.io MongoDB+

When recently upgraded by MongoDB+ (MongoDB version 3.2) with Compose.io after having MongoDB Classic deployment (MongoDB version 3.0), i noticed that they did not offer ReplicaSet for the new deployment.

There is no replica set for the deployment and it is a sharded deployment that's fronted by a 'mongos' router.

Every deployment had 2 mongos router. With meteor we can only use one mongos router since meteor will treat a MONGO_URL putting two mongos router seperated by a comma as a replicaSet and we get an error which says MongoError: not master.

So we only put one router in MONGO_URL.

now the Problem:

I hosted my applications on Galaxy Developer's edition. If one mongos router failed, the application stops and does not process Observers again.

So, we need to create some simple testing logic within the application to see if the host is up and if not move to the next ingress point which i think currently is not supported by Meteor.

Please correct me if I am wrong. What could be a workaround.

Upvotes: 0

Views: 133

Answers (1)

zydcom
zydcom

Reputation: 518

You can add a proxy (like haproxy, lvs) in front of mongos, see https://gist.github.com/sawanoboly/1366694.

Meteor ==> Haproxy ==> [Mongos1, Mongos2 ...] ==> [ReplicaSet1, ReplicaSet2 ...]

Upvotes: 1

Related Questions