title: How to format the connection string for a MongoDB replica set in Sitecore?
body: <p>I have configured MongoDB for Sitecore using a replica set.
  I set up keyfile access control and added a user.
  But I'm facing problems while creating connection strings.</p>
  
  <p>Lets assume my replica set name is <code>rsHelloWorld</code> with several <code>mongod</code> instances: <code>localhost:21017,localhost:21018,localhost:21019,localhost:21020,localhost:21021(arbitor)</code></p>
  
  <pre><code>username: mongo_admin
  password: test@123
  </code></pre>
  
  <p>The default connection string in Sitecore is:</p>
  
  <pre><code>  &lt;add name="analytics" connectionString="mongodb://localhost/analytics" /&gt;
  </code></pre>
  
  <p>How to specify the connection string for my MongoDB database with a replica set and authentication?</p>