If you have missed – here is the Part 1 of the article, the one where I am researching for the tools we do need to be able to build the Node.js clustered app with autodiscovery.
Let’s continue, then. First of all – you can find the application on github here: https://github.com/PavelPolyakov/nodejs-clustered-app-with-autodiscovery . There you can also find the setup guide and try to launch the cluster yourself, you don’t need much, just four Vagrant machines.
In the application below is a demo example of the Node.js clustered app with autodiscovery. I’m sure it’s possible to build another setups and, probably, there are some already, but I came up with the next one.
In today’s article I would share my experience in building the Node.js application, which can make a cluster with another copies of the app even if it doesn’t know where the other apps are located at the moment of the application start.
Sounds too complicated, so first let’s talk about clusters.
Node.js remote debug is the perfect option for the cases, when you project is run inside the Vagrant box.
Luckly, both node.js and WebStorm have all the needed options, to make the debug still possible and convenient.
Below it’s described how to configure the Node.js Remote Debug in WebStorm.
Node.js 0.11 is quite stable to use it on production. On your local machine you, probably, are using the nvm to install node.js versions.
But on the remote server it is not the best idea, because we want to have one node.js and npm installation for all the system users.
How to install it properly?
Sometime it happens, when
apt-get install php5-curl
is not enough. And you really want to upgrade your curl to the latest possible version.
In this part, we would cover the elasticsearch configuration and, finally, launch and test our cluster. Assoming that you’ve already read and did the steps from the Elasticsearch cluster on AWS. Part 1- preparing the environment.
In this article, I would show how to build a solid elasticsearch cluster on AWS. In the part 1 we would cover all the details of the AWS EC2 instance creation and preparing the environment to setup the elasticsearch cluster.
This blog should be the collection of useful articles about my life experience. Most of all, there would be IT related articles, but I can’t promise right now, that I would avoid some less geeky themes.
Let the show begin!