0

I implemented oplog on our server and that time our application response time improved but after some hour response time increased and application response was very slow.

Can you let me know the

Disadvantage of Oplog

Impact of Oplog on Meteor Application

what needs to take care while implementing oplog.

Please help me I go through several video and link but not find any satisfactory answer, thanks.

sakshi
  • 171
  • 1
  • 1
  • 14
  • It is a very broad question to answer. There are several posts related to oplog (e.g, [this](https://blog.meteor.com/tuning-meteor-mongo-livedata-for-scalability-13fe9deb8908#.ia4vq6e53) and [this](https://github.com/meteor/docs/blob/version-NEXT/long-form/oplog-observe-driver.md), but its impact depends on your use case and implementation. Arunoda wrote about it [here](https://kadira.io/academy/meteor-performance-101/content/optimize-your-app-for-oplog). You will need to monitor, analyze and refine your implementation according to what you discover. The way it is, it's too broad for SO, IMHO. – MasterAM Feb 21 '17 at 11:33
  • If you don't use oplog meteor will run all your live-query every 10 seconds, diffing data to check if something new happened, this is a very expensive operation. I think no meteor app can be used without oplog in production. I personally deployed a tiny app for internal purpose without oplog and when there was 10 user connected the site was unusable and the main reason was no oplog on server. – perusopersonale Feb 21 '17 at 12:21

1 Answers1

0

As mentioned in the comments, this is a very broad question and the "correct" answer completely depends on your specific situation (e.g. app needs, use case, etc.). Nevertheless, here is my attempted answer based upon having been thru the challenges of scaling Meteor apps.

  • If at all possible, you will want to enable oplog tailing in your production Meteor app. If you have done any Meteor development, then you are used to using the oplog because it is enabled by default.

  • The symptom you describe of the application response times increasing over time and becoming very slow is likely the result of something else going on with your app or hosting environment / infrastructure. I have run multiple production Meteor apps with 100+ simultaneous users and have never experienced this occurring.

  • There is one specific situation where you would NOT want to use the oplog and that is if you have a complex query where the bulk of the resulting data gets updated often. This can causing CPU spikes and/or thrashing and will kill your apps performance. I have one such application that falls into this category and after extensive testing, I found that it is much better to disable oplog on the query and increase the pollingThrottleMs accordingly. Again, this is an exception case and represents about the only time that you would want to stay away from using the oplog.

These are just some very surface level thoughts on the use of oplog based on my experience. I encourage you to experiment and see what works best for your app.

jordanwillis
  • 10,449
  • 1
  • 37
  • 42
  • thanks for the response @jordanwillis, I enabled oplog on mongodb. Issue is coming when we are doing performance testing. – sakshi Feb 22 '17 at 09:16
  • I am asking "what needs to take care while implementing oplog." as code level. – sakshi Feb 22 '17 at 09:19
  • From a code level, there really isn't anything different or special that you need to consider. Regardless of if you are using oplog or polling, livequery is handling the reactivity and your code is just simply telling livequery what data you care about (via your Find selector). In other words, if I switch between oplog or polling, there is nothing in my code that I would change (with the exception of tweaking the polling parameters on Collection.find) – jordanwillis Feb 22 '17 at 15:04