Thursday, 6 April 2017

Tip # 7 : Sitecore Tip Of The Day!

How Should You Configure Sitecore MongoDB Connection Strings?

Brijesh Patel has posted a tip which a Sitecore developer must not skip or take for granted.
His tip says that -

Mongo Database is now an integral part of Sitecore Experience Platform. Sitecore instances connect to mongo databases based on the values specified in connectionstrings.config.

If a Replica set is configured for mongo databases having Primary, Secondary and Arbiter, connection string should only have reference of Primary and Secondary. Arbiter is used only for voting as to who becomes Primary and takes in all reads and writes in a replica set. This serves the purpose of Arbiter which should not store any data.

Connection string for connecting mongo databases should be mongodb://user:password@primary,secondary/databasename?authSource=admin