DEV Community

Cover image for Meteor 2.16 and Oplog Tailing Optimization
Denilson for Meteor Software

Posted on

Meteor 2.16 and Oplog Tailing Optimization

We're excited to announce the release of Meteor 2.16, packed with significant improvements designed to optimize your experience and enhance performance.

Optimized Oplog Tailing Performance

In response to community feedback and extensive discussions about Meteor's oplog implementation and its limitations in scaling, we've introduced new MongoDB package options to optimize oplog tailing performance.

This was thanks to one of our community members,@twisterking, who opened a pull request introducing this new improvement.

The implementation provides a solution for including or excluding specific collections from oplog tailing. This simple yet effective change can drastically reduce CPU load during large batch updates.

Usage:
To configure this optimization, update your settings.json file as follows:

{
  // ... all other settings,
  "public": {
    // all your public settings
  },
  "packages": {
    "mongo": {
      "oplogExcludeCollections": ["products", "prices"], // Excludes "products" and "prices" collections from oplog tailing.
      // OR:
      "oplogIncludeCollections": ["messages"] // ONLY monitors the "messages" collection for oplog updates (and all "admin.$cmd" oplogs).
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

We believe this enhancement will greatly benefit users, reducing unwanted server restarts and ensuring smoother operations.

Session Storage Option for Accounts

Some developers have suggested that a storage system other than Local Storage (which Meteor users use to store login tokens and other things) should be possible, and the second option should be Session Storage.

Today, this is possible thanks to @StorytellerCZ, who created this PR to address the matter.

To use Session Storage instead of the default Local Storage, you can add this to your settings file:

{
  // ... all other settings,
  "public": {
    // ... all your public settings
    "packages": {
      "accounts": {
        "clientStorage": "session"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

From here, your app will start using Session Storage!

How to test it

To install Meteor in this version:

npx meteor@latest 
Enter fullscreen mode Exit fullscreen mode

You can create a new app in this version with:

meteor create myapp --release 2.16
Enter fullscreen mode Exit fullscreen mode

Or update from 2.15 to this one with:

meteor update --release 2.16
Enter fullscreen mode Exit fullscreen mode

If you're coming from an older version, please check our Migration Guides.

Special note about Meteor 3 Launch Week

With 2.16, we're also having our Meteor 3 Launch Week, introducing more of our Meteor 3, as well as Galaxy 2.0, and we will have! So keep an eye on our dev.to and on X.

Conclusion

This 2.16 version offers more to explore. Check out the rest in our PR.

We can leave without mentioning the people who made this release possible:

@nachocodoner
@StorytellerCZ
@jamauro
@Twisterking
@harryadel

Thank you for your hard work and dedication to the Meteor.js community!
We encourage all users to update to Meteor.js 2.16 to take advantage of these new features and improvements.
For more information about Meteor.js, please visit the Meteor.js website.

Happy coding!

Top comments (1)

Collapse
 
sherrydays profile image
Sherry Day

How does the new oplog tailing optimization impact large applications? Thanks for sharing these improvements!