Partner links

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

Let' s Chat

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

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
0
Hya, what do you think? Please comment.x
()
x