Tuesday
27
Jan 2009

keepalived: who needs a redundant load balancer setup?

(3:31 pm) Tags: [Software, Why I like..., Projects]

I was recently tasked with some performance work for a client. Their production web application written in CakePHP was having serious speed/load issues, so I jumped in and took a look.

After some initial testing, I determined that the load balancer serving HTTPS traffic to 2 web servers was only allowing 10 requests/second through, while each web server individually would handle more than double that. I set up a simple SSL/mod_proxy using apache from my own colocated server, and the throughput jumped fourfold to over 40 requests/sec. After checking all was well with the hosting company’s rented load balancer, we decided to ditch it.

I set up a simple load balancing solution using the proxy capabilities of nginx, proxying back to Apache. I did this so I could be sure that the Apache config was untouched. After getting that set up, and seeing the performance come back to expectations, I was then asked by the client to make it redundant (with failover).

I did some quick research, and found keepalived, a small project that is part of the larger Linux Virtual Server project. The best config I found was actually found in docs for haproxy, ironic.


vrrp_script chk_haproxy { # Requires keepalived-1.1.13
script "killall -0 haproxy" # cheaper than pidof
interval 2 # check every 2 seconds
weight 2 # add 2 points of prio if OK
}

vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 51
priority 101 # 101 on master, 100 on backup
virtual_ipaddress {
192.168.1.1
}
track_script {
chk_haproxy
}
}

I modified the virtual ip address, and the check script to look for ‘nginx’, and bammo, it just worked, right out of the box.

I am pleased with the simple configuration of keepalived, and that is ‘just worked’.

Popularity: 57%

Comments: Comments Off
Sunday
25
Jan 2009

Book Review: Lighttpd by Andre Bogus

(2:39 pm) Tags: [General, Why I like...]

I was asked by PacktPub to write a review of their new book on lighttpd, Lighttpd by Andre Bogus. It has taken a while to get this one up the queue, but I was pleased.

Overall, the book is a great introduction to using lighttpd as a web server, and PacktPub has even allowed me to attach Chapter 10, Migration From Apache, for your browsing enjoyment.

Like all other PacktPub books I have bought, the book is on target with the title, and while they all have just a few editorial snafus, it doesn’t stop from getting the point across.

Comparing and contrasting to my own experience with lighttpd, I found I knew most of the book, with exception of the excellent chapters on Using Lua with Lighttpd (Chatper 12), and writing your own modules (Chapter 13).

If you are looking for a book to get you going on Lighttpd, this would be the one I would recommend.

Popularity: 53%

Comments: Comments Off
Tuesday
6
Jan 2009

sparse revisions in subversion

(9:38 am) Tags: [Software]

Finally, an easy way to keep the root folder checked out, but only check out a few subfolders.
svn co --depth=empty is the best new feature in svn 1.5, bar none. Check out more info here and here.

Popularity: 51%

Comments: Comments Off
Saturday
3
Jan 2009

DimDim mini-review

(12:14 pm) Tags: [Software]

We tried out a company conference call using DimDim yesterday morning, and here is a mini-review.

Pros

Cons

Looks like we will have to stay with our current crap solution that we have, because screen sharing is our 90% use case.

Popularity: 53%

Comments: Comments Off
Friday
2
Jan 2009

Tango Patch Day

(2:19 pm) Tags: [D Programming Language]

Today was my day for patching up Tango, and I managed to make a good dent in getting Tango working on 64bit with GDC. As of svn revision 4235, I am compiling and running my programs on 64 bit Ubuntu 8.10 with GDC and tango.

Now to go see if I can get Mango going on 64bit.

Popularity: 57%

Comments: Comments Off
Thursday
1
Jan 2009

WebSVN install

(3:59 pm) Tags: [Software]

Installed WebSVN this afternoon for the corporate svn repository, and from the first use, it is one fast little script.

We were using Trac in the past, but I feel for svn browsing, WebSVN is going to become the de-facto standard.

Install was simple, just unzip, copy the sample config to your own, and edit a few options.

Popularity: 52%

Comments: Comments Off

rsync backups with TeraStation

(11:41 am) Tags: [Software, Life]

I just successfully set up a backup for my laptop to the home TeraStation, using instructions I found here.

If you just generically want to start using rsync to do backups, there is a great resource here.

I am already backing up via SVN for the really important stuff, and SVN backs up to S3, so I am covered there.

At work, we are using JungleDisk Workgroup to back up home folders, and that seems to be working out fairly well.

It feels good to start the new year with a backup…

Popularity: 58%

Comments: Comments Off