Scaling Meteor app - Moving cron jobs to a separate dedicated server


#1

We have 3 production servers (DigitalOcean) running our Meteor app (Using Mupx, Cluster) and these contain SyncedCron jobs doing various background tasks regularly. The server CPUs have recently started getting maxed out and I am now considering moving all background cron jobs to a separate dedicated server so it does not affect the main app.

Is there any recommended way of handling this?

I first thought of creating a separate microservice and connecting it with the main app through DDP calls. But I don’t think this will help because the Cron job needs data from the main app and so this will still keep the main app busy.

I am now considering creating a new Meteor app that shares the database with the main app and this new app will have all the cron jobs running. Is this a good option?

I’d appreciate any tips on this topic.


#2

I’ve used AWS Lambda for cron based mongo backups with great effect. It’s free for less than a million calls a month and very reliable. Slightly different use case but worth looking into as it scales infinitely.

Check out: http://blogs.csc.com/2016/06/14/using-aws-lambda-for-free-mongo-backups/