Mupx: Is it possible to activate oplog tailing on the local DB?


#1

For my staging instance, I am using the local MongoDB installed by mupx on my EC2 server. Kadira tells me that oplog tailing is not activated here.

It works fine on my production instance that is connected to a Compose.io replica set, but it does not work for the staging system, where I want to rely on the local DB (since there is no production data to be hold).

Is there any way to enable oplog tailing in the mupx DB installation as well, just for performance improvement?


#2

I wrote a blog post with instructions on how to do this. Let me know how you go!


#3

That was a super useful blog post. I had the oplog working on a production instance of a mupx deployed app in minutes. It would have taken me a day of Googling, reading, trying and failing, to figure it out by myself. Thank you so much for sharing!


#4

Thanks for sharing this blog post, will try it!


#5

Hi, your link is broken, can you republish?


#6

Oops, redeployed my blog and neglected to set up redirections, my apologies. New link here: https://acrofever.com/blog/adding-oplog-tailing-to-a-meteor-app-using-mup-mupx.html


#7

Thanks for this blogpost, this is really helpful! One question: Will the oplog tailing modifications still be active if you repeat mupx setup? I need to do this regularly since I have to replace my SSL certiciate (from letsencrypt.org).


#8

Not quite sure to be honest with you. I’m now using the new(er) development version of meteor up which actually has planned support for oplog in the mup config file, but I don’t believe that’s been implemented yet.

Things get a little trickier now with Meteor 1.4 using Mongo 3.2, which has different requirements for setting the oplog URL. However the new version of mup hasn’t been updated to support Meteor 1.4 yet so I’m using a custom docker image. When I get a bit of free time I’ll investigate and report back with my findings!

Have you managed to test if the change is persistent after running mup deploy?


#9

Incidentally just as a bit of extra info on the state of meteor up - I’ve had to fork the meteor-up repo to allow setting a custom docker image for the SSL frontend too. This is for a couple of reasons -

  1. The mup-frontend-server image used by default hasn’t been yet been updated to fix an OpenSSL vulnerability
  2. I use a custom nginx.conf to serve my static HTML blog

My forked version also includes the ability to mount volumes on the SSL frontend, which I needed to do for serving my blog. The current branch of the main repo only supports mounting volumes on the meteor image.