Load Balancing with pound and Mongrel Clustering

November 18, 2008 at 2:36 am Leave a comment

In my previous post I have written about mongrel clustering..

Now if you want to add the load balancing feature to it you may use pound. Pound is a software HTTP Load Balancer and Reverse Proxy.

These are the steps how you can configure pound with mongrel cluster. First configure mongrel cluster as per the previous post.

Then download and install pound from http://www.apsis.ch/pound/Pound-2.0.9.tgz

Now the configuration step

Pound.cfg needs to be configured which will reside in /etc/pound/pound.cfg

also a symlink is required to be made

$ sudo ln -s /etc/pound/pound.cfg /usr/local/etc/pound.cfg

A basic version of pound.cfg will look something like this

User        "www-data"Group       "www-data"LogLevel    2Alive       30

ListenHTTP Address 123.123.123.123 Port    80End

Service HeadRequire "Host:.*www.dhavalparikh.co.in.*" BackEnd     Address 127.0.0.1     Port    8080  End Session     Type    BASIC     TTL     300   EndEnd

Service URL ".*.mov" BackEnd     Address 69.12.146.109     Port    8081  End Session     Type    BASIC     TTL     300   EndEnd

Service # Catch All BackEnd     Address 127.0.0.1     Port    9000  End   BackEnd     Address 127.0.0.1     Port    9001 End Session     Type    BASIC     TTL     300 End

Then start pound with the following command

$ sudo /etc/init.d/pound start

finally you will have mongrel cluster setup done so start mongrel cluster

sudo mongrel_rails cluster::start

Thats it you mongrel cluster with pound configuration is done..njoi the power of load balancing

Advertisement

Entry filed under: mongrel clustering and pound, pound with mongrel cluster. Tags: .

Mongrel Clustering with Rails Nginx configuration, expiry headers and gzip component with rails – nginx.conf

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed



Follow

Get every new post delivered to your Inbox.