This Node.js application creates a simple load balancer using HTTP proxy to distribute incoming requests among multiple servers. It randomly selects a server from a predefined list of servers to forward the request to, achieving basic load balancing.
Follow these instructions to set up and run the load balancer on your local machine.
Make sure you have Node.js installed on your machine. You can download and install it from here.
-
Clone this repository to your local machine:
git clone https://github.com/ranjeetmasaischool/LoadBalancer-NodeJs-main
-
Navigate to the project directory:
cd project-directory
-
Install dependencies:
npm install
To start the load balancer, run the following command:
npm start