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 More options for connection string to mongo databases can be found at https://docs.mongodb.com/manual/reference/connection-string/ Liked it? If you have such a small and sweet Sitecore tip to share with the community then come and share here by filling this form. Stay tuned for more tips!

Leave a Reply