Google Plus

Pen & Pound- 2 Great opensource server Load balancing tools for Linux

Written by Mel Kham on . Posted in Linux tutorials

Load balancing is a technique to distribute workload evenly across two or more computers, network links, CPUs, hard drives, or other resources, in order to get optimal resource utilization, maximize throughput, minimize response time, and avoid overload. Using multiple components with load balancing, instead of a single component, may increase reliability through redundancy. The load balancing service is usually provided by a dedicated program or hardware device (such as a multilayer switch or a DNS server).

Today will show you 2 load balancing tools, Pound and Pen.

Pound Balancing Tool:

“The Pound program is a reverse proxy, load balancer and HTTPS front-end for Web server(s). Pound was developed to enable distributing the load among several Web-servers and to allow for a convenient SSL wrapper for those Web servers that do not offer it natively.”

Installation

For ubuntu:


sudo apt-get install pound

For Fedora:

yum install pound

Now in this example  are  2  apache  servers and 1 pound  server. We will try to configure the load balancing between this servers.

To do that, edit  /etc/pound/pound.cfg and  replace everything below and including ListenHTTP :

vi /etc/pound/pound.cfg

Output

ListenHTTP
Address 192.68.1.110
Port    80
End

Service
BackEnd
Address 192.168.1.2
Port    80
End
BackEnd
Address 192.168.1.3
Port    80
End
End

If you are u sing a certicat ssl , generate a new certificate with:

cd /etc/ssl && openssl req -x509 -newkey rsa:1024 -keyout local.server.pem -out local.server.pem  -days 365 -nodes

and add to the pound config

ListenHTTPS
Address 202.54.1.5
Port    443
Cert    "/etc/ssl/local.server.pem"
End

After any configuration restart the pound with

# /etc/init.d/pound restart

PEN Load  balancer tool:

Pen. It’s also a load-balancing proxy, but handily it lets us choose whether or not the X_FORWARDED_FOR header gets changed. It’s about as fast as Pound, and about as stable. Its SSL support is still experimental, but that’s OK, since we’re proxying between local services, not serving as an external front-end. (If we were, we’d probably use Pound.)

This load balancer is known to work on FreeBSD, Linux, HP-UX and Solaris.

Installation:

First download and extract pen to your local directory. Then run the following commands:

	./configure
make
make install

By default the programs are installed in /usr/local/bin. This can be changed like this example:

        ./configure --prefix=/usr

to install into /usr/bin instead.

Lets  give  your  some  example  how  top run pen

HTTP + HTTPS

pen -l pen80.log -p pen80.pid -h lbhost:80 host1:80 host2:80
pen -l pen443.log -p pen443.pid -h lbhost:443 host1:443 host2:443

FTP

pen -l pen.log -p pen.pid lbhost:21 host1:21 host2:21

Can be used for other applications like mail mail mstp  and  openldap.

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • http://www.bestfinance-blog.com SharonEvans26

    Lots of specialists claim that credit loans help a lot of people to live their own way, just because they are able to feel free to buy necessary stuff. Moreover, a lot of banks offer collateral loan for different classes of people.

  • http://www.bestfinance-blog.com ERINWatts

    Some time before, I did need to buy a house for my corporation but I didn’t earn enough cash and couldn’t buy anything. Thank goodness my friend proposed to get the loans at trustworthy creditors. Therefore, I did that and was satisfied with my term loan.

  • http://siag.nu/pen/ Ulric

    sudo apt-get install pen works well for me.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

I am working on it. Stay tuned. Thanks for the comment.

adriana rizzati

|

You are right, I saw them just now and they are awesome!

SK

|

Thanks for the comment Abdullah. Stay tuned with us always.

Abdullah Musazai

|

Thank you for such a great service you always do, hope you gain more power and more energy to work more & more

Dominik Bauer

|

thx a lot!

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .