Docker & Container Runtimes

Clustering a Node.js application with Mongo, Docker and Rancher

Rancher is a platform for deploying dockerized applications. In this link-ed post, you’ll read how to use it to cluster a Node.js application with a replicated MongoDB backend.

The article was first published on the Rancher blog by Hussein Galal.

Since the availability of Rancher’s Beta release a few weeks ago, I’ve been pretty excited about the new scheduling and service discovery capabilities in the platform. To help people understand the impact of these capabilities, today I’m going to show how to use these features to deploy a fully clustered and HA implementation of a Node.js application.

I’m going to use Let’s Chat as our example application, It is an excellent open-source, Slack-like team chat application. Deploying a single Let’s Chat app with a Mongo backend is incredibly easy, and there is an excellent Docker compose file already available to do this. However, my goal was to build a clustered and highly available setup, that could handle host failure, so I will run several MongoDB containers and set up a replica set to replicate the data between those containers. The replica set has the ability to elect a new primary server when the master goes down.

You may read the complete article here.

Let' s Chat

Subscribe to LinuxBSDos.com

Subscribe to receive the latest articles in your Inbox

Trust me, you'll not be spammed...

Please share:

We Recommend These Vendors and Free Offers

Register now for Blockchain & Cryptocurrency Con 2018, international conference on blockchain technnology in Dallas, TX (USA), Feb. 23-24, 2018. A 50% discount for students.

Best WhatsApp Plus features in Gbwhatsapp latest APK download

Best binary auto trading software reviews by 7binaryoptions.com

Google has got competition, because Presearch is building a blockchain-based search engine controlled by the community. At $0.15 a token, you can participation in Lot 3 of the token sale by clicking here

Open Money is building a solution that will run mainstream software on blockchain tech. Click here to get free tokens that will be the digital currency of the platform

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).


Leave a Comment

Your email address will not be published. Required fields are marked *

*