GCE Kubernetes: MongoDB CPU Spikes reflects on all Pods

We’ve setup a Kubernetes cluster containing our Meteor application (one worker doing aggregations, and several webapps which are the one actually used by the clients).
While investigating an issue with MongoDB failovers i tried to stress the MongoDB using https://github.com/mongodb/mongo-perf (simple writes), i noticed that the CPU load on the MongoDB reflects itself onto all pods.


I’m not a Meteor Developer, i’m just a Sysadmin which is concerned about the performance of those things. So my question is, is this just how meteor works or should i be concerned about this?

Hi @jeredepp

Meteor’s “live data everywhere” feature uses MongoDB’s oplog, any updates to the database must be processed by each Meteor server to update logged in users mergeboxs, which push updates to the client. Meteor publications are live database cursors - not static collections.

So without knowing the details, mongo-perf is writing a bunch of stuff that needs to be processed by Meteor servers. If mongo-perf is modeling a real-world load, then I’d guess the Meteor application needs beefier hardware or a refactor for performance.

Cheers!

https://github.com/cult-of-coders/redis-oplog this is the solution to scale it properly, otherwise you will reach a point when you can no longer scale.