Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This project is an attempt to build the proof of concept of node.js auto discoverable cluster. It's possible, that nodes of the cluster could be located in the different networks.

In detail, the project is described in the articles which are linked below:

Video: Running the app

Next technologies are used:

  • Vagrant (for virtualization, at least version 1.7.4)
  • etcd (to store the registry of the active nodes)
  • node-discover (auto discovery framework)

To run the app the next should be done

  1. Vagrant >= 1.7.4 should be installed
  2. Assuming you are going to setup the project to the folder /Users/user/etcd-test
  3. Checking out the git repository
cd /Users/user/
mkdir etcd-test 
cd etcd-test
git clone .
  1. Preparing the etcd machine
cd /Users/user/etcd-test/
cd etcd-vagrant
vagrant up
# write down the IP and port of the etcd server
# let's assume that it is

Using the UI url - you can examine the current etcd content.

  1. Prepare the node machines
cd /Users/user/etcd-test/
cd node-app-vagrant
cd config
cp default.js.sample default.js
vi default.js # here we need to put the actiaul etcd server IP:port to the etcd section of the config, instead of the example one
# let's assume, that the we have adjusted the config
cd ..
vagrant up

During the machine instantiating, Vagrant would prepare three servers - A,B,C. Each server is able to run the node-app node, all together they should build up a cluster. 6. After some time, the machines would be instantiated. It's time to run the application. Let's open three terminals - one per app.


vagrant ssh A
cd node-app
npm run app


vagrant ssh B
cd node-app
npm run app


vagrant ssh C
cd node-app 
npm run app

In case we did everyhing right before, there is a good chance to see that three of our nodes are up. One of the is master. Master sends the tasks to the worker nodes, workers are performing the calculations and returning the results to the master.


No description, website, or topics provided.



No releases published
You can’t perform that action at this time.