This is a demonstration of load-balancing using nginx, done on one of my previous projects NodeMailer. In this I have 3 secondary ports to run the server for the webapp, defined in the nginx.conf file.
If we have excess load on the primary port the traffic will be directed to any of the load-balancing ports with the help of nginx. Finally, the webapp and the nginx have been integrated on a single server using Docker, specifically Docker-Compose.
This is a list of the major frameworks that were used in this project using:-
- Clone the repo
git clone https://github.com/RishabhKodes/nginx-loadbalancer.git
- Goto the project directory
cd nginx-loadbalancer
- Run using docker-compose:
docker-compose up -d
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Rishabh Bhandari -
Made with ❤️
by e33or_assasin