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

Please share:

We Recommend These Blockchain Conferences and Servicess

Register now for Blockchain & Decentralized Tech SuperSummit, international conference on blockchain technology in Dallas, TX (USA), April 1 - 4, 2019

Reasons to use control panel for your server

Today's valid web hosting discount codes

Learn how to trade cryptocurrencies using technical and fundamental analyses at BDT SuperSummit

Best binary auto trading software reviews by

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 *