Installing the pen load balancer on Debian GNU/Linux 4.0 (etch)

Overview

This document explains how to install pen, a load balancer for "simple" tcp based protocols such as http or smtp. We use pen in our development environment. Pen is a good substitute for a hardware based load balancer.

Assumptions

This document assumes that you have a server running the current version of Debian stable. Although, these instructions should apply to Ubuntu as well. The Debian install process is well documented and fairly straightforward, so we provide no documentation for it. We suggest that you do a minimal install using the Network Install CD. We also assume that you already have JBoss running on two or more servers on port 8080. If not, we have instructions for installing JBoss if you need them.

Installation

Update your packages database with this command:

  # apt-get update

Install pen

  # apt-get install pen

Configuration

Configuring pen is dead simple. You just need to add one line to /etc/rc.local . The following line tells pen to listen on port 80 and forward requests along to port 8080 on cherry, grape, and lime.

  /usr/bin/pen 80 cherry:8080 grape:8080 lime:8080