Setting up oplog-Tailing for your production app
It’s highly recommended to enable the MongoDB oplog to get the full potential out of your Meteor-Application.
In this blog post I’ll show you how you can setup oplog-Support for your Meteor application using a Compose.io MongoDB.
This can be applied to any other MongoDB hoster/setup.
Note: oplog-Support may only be available on paid plans.
Let’s start.
Configure your MongoDB settings in the Compose web interface
- Go to the Users-Settings for your database and add a user who has oplog-Access to the database
- Go to the Admin-Settings, copy the Replica Set URI and modify it as shown below
The Replica Set URI
Unmodified Replica Set URI:
<br />
mongodb://USERNAME:PASSWORD@lamppost.11.mongolayer.com:10240,candidate.12.mongolayer.com:10350/test<br />
Modified Replica Set URI:
<br />
mongodb://USERNAME:PASSWORD@lamppost.11.mongolayer.com:10240,candidate.12.mongolayer.com:10350/local?authSource=test<br />
The Modified version of the replica set URI is your MONGO_OPLOG_URL which you can used alongside the MONGO_URL to increase the performance of your Meteor application.