nodejs load balancing app to distribute http requests evenly across multiple servers.
How to use ?
- Please edit the file 'config.json'.
- enter the value 'host' and 'port' with the following format:
{
"host" : "your-ip-server",
"port" : port-server
}
- Perform package installation
npm install
- For a test run:
npm test
- If you want to run in production mode, please install the 'pm2' module.
npm install pm2 -g
- Then run the following command:
npm start
------------------------------------ **** ------------------------------
Thanks to :
- PM2 : https://www.npmjs.com/package/pm2
- http-proxy : https://www.npmjs.com/package/http-proxy
- load-balancers : https://www.npmjs.com/package/load-balancers
