Install Pound as Web Load Balancer
One of our website host contents which can be downloaded by clients. Since this content is getting popular, our bandwidth usage and server load are getting higher everyday and we need something to balance this out. To solve this issue, I have using an application called Pound, which is a reverse proxy, load balancer, auto HTTP fail-over and HTTPS front-end for Web server.
The installation and implementation is very simple with help of RPMforge. Pound is open-source software which you can find out more information about it at http://www.apsis.ch/pound/ .
I will use a simple kind of architecture as below:
Lets assume I already have the website hosted in both servers, which I already copied using cPanel copy account tools. Variable as below:
OS: CentOS 5.6 64bit
Website URL: http://download.myinstaller.org/
1. Install RPMforge repository for yum. Go to http://wiki.centos.org/AdditionalResources/Repositories/RPMForge and choose which CentOS operating system you used. In this case, I will use CentOS 5 64bit packages:
$ cd /usr/local/src $ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm $ rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt $ rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm |
2. Install Pound via yum:
$ yum install pound -y |
3. Rename original config file because we will use our configuration file:
$ mv /etc/pound.cfg /etc/pound.cfg.ori $ touch /etc/pound.cfg |
4. Copy and paste following configuration into /etc/pound.cfg using text editor:
User "nobody"
Group "nobody"
LogLevel 1
Alive 2
ListenHTTP
Address 109.169.80.202
Port 80
End
Service
HeadRequire "Host: .*download.myinstaller.org.*"
BackEnd
Address 109.169.80.204
Port 80
TimeOut 300
End
BackEnd
Address 212.24.47.68
Port 80
TimeOut 300
End
Session
Type Cookie
ID "JSESSIONID"
TTL 300
End
End |
5. Make sure Pound is working at startup service and started:
$ chkconfig pound on $ service pound start |
6. Check whether Pound is listening to the correct value:
$ netstat -tulpn | grep pound tcp 0 0 109.169.80.202:80 0.0.0.0:* LISTEN 29358/pound |
7. To check the log files, you can monitor /var/log/messages using following command:
$ tail -f /var/log/messages |
8. Last step is to point the subdomain to the load balancer IP. In this case, I need to login to my domain name server and change the A record for this subdomain. Example as below:
download.myinstaller.org A 109.169.80.202 |
After DNS propagation is completed, you should notice that Pound has started to work and balancing your website!
Related Posts
- Linux: Install JAWStats – Beautiful Statistic using AWStats Core
- Linux: Install LiteSpeed Web Server
- Linux: Install Subversion (SVN) Server
- CentOS: Install MongoDB – The Simple Way
- CentOS: Install OpenLDAP with Webmin – The Simple Way
- Apache: Kill Certain httpd/PHP Processes in DSO
- Linux: Install and Configure Varnish as Cache Server
- Linux: 2 Way File Synchronization and Replication using Unison + FTP
- Linux: Install and Configure PostgreSQL with pgAdmin
- Linux: Log Rotation Customization
2 Responses to Install Pound as Web Load Balancer
Leave a Reply Cancel reply
Sci/Tech – Google News- Yahoo to spend $US1.1bn in cash on Tumblr, sources told the WSJ - The Australian 19 May 2013
- Pedrosa wins in France, takes MotoGP lead - Business Recorder - Business Recorder (blog) 19 May 2013
- Global warming likely to be slower than predicted, scientists say - Financial Times 19 May 2013
- BMW 7 Series: Style tweaks so subtle in Seven - New Zealand Herald 19 May 2013
- CC100 Speedster: Aston Martin unveils six-litre concept car to mark 100th ... - Daily Mail 19 May 2013



hello,
thanks for your share. i have one question. should i install Pound in a seperate server for webiste banlance?
thanks
In this example, I am using Pound in separate server. Pound has some limitation for load balance but not for failover, you better use HAproxy instead.
You may refer to the other post for web server high availability using Pound:
http://blog.secaserver.com/2012/04/web-server-cluster-using-apache-pound-unison/