Today, we will see how to set up Pound, a reverse proxy that will allow us to load-balancing between several websites.
- A machine with pound
- In my situation, I use 3 web servers
INSTALLATION OF POUND
First, start by updating your machine.
apt-get update && apt-get upgrade
Then install pound.
apt-get install -y pound
CONFIGURATION OF POUND
The configuration of pound is done in the file /etc/pound/pound.cfg:
First, we declare the IP address 10.0.24.109 (the IP address of the Pound machine) as the IP address that we will use to access the 3 websites.
Then we declare the 3 IP addresses of the 3 web servers that we have set up to indicate to the pound server on which web servers it will do the load distribution.
Once you have declared your servers, you must set the pound service to be active at default startup:
Now restart the pound service.
service pound restart
If all is correct, normally when you enter the IP address of the machine with pound, it will redirect you to one of the 3 websites.
Then update the web pages several times and you will find that pound will redirect you randomly to one of the 3 websites.