Tag: foundry

This post is intended to be a general guide for configuring “stickied” load balanced HTTP servers. Whether it’s F5 load balancers, foundry load balancers or open source based load balancers (keepalived/lvs), the concepts are the same and can be migrated across said platforms.

If you have a paid of foundry’s and are looking to configure stickied load balanced HTTP servers, hopefully this guide will provide some assistance.

Logging into the load balancer

Telnet to the box and ‘enable’ to allow admin access. The first thing you want to do is show the current configuration to view the existing setup for other working boxes :

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

>telnet192.x.x.x

Trying192.x.x.x...

Connected to10.x.x.x.

Escape character is'^]'.

User Access Verification

Please Enter Login Name:admin

Please Enter Password:

User login successful.

SLB-telnet@XXXX>enable

Enable Password:

Error-Incorrect username orpassword.

SLB-telnet@XXXX>enable

Enable Password:

SLB-telnet@XXXX#

Real servers : defining the multiple load balanced boxes

Show the existing configuration on the foundary :

1

sh config

Take a look at the configuration of two “real” servers, which are the two servers that are behind the load balancer that will have balanced sticky connections :

1

2

3

4

5

6

7

8

server real serverposapp01-tomcat01192.168.1.141

port defaultdisable

port8001

!

!

server real serverposapp03-tomcat01192.168.1.143

port defaultdisable

port8001

The above example is balancing TCP 8001 traffic, which is for TOMCAT. Here are entries for two servers doing simple HTTP traffic :

1

2

3

4

5

6

7

8

9

10

11

server real serverapp01-vhost01192.168.1.195

port defaultdisable

port http

port http keepalive

port http url"HEAD /"

!

server real serverapp02-vhost01192.168.1.196

port defaultdisable

port http

port http keepalive

port http url"HEAD /"

This example is similar to the tomcat example, except you have several options. “port default disable” disables all other ports. “port http keepalive” and “port http url “HEAD /”” define the http checks that take place to ensure apache is running on that box. If not , it will fail over to the second box and stop sending traffic to it.

SSL Connections

SSL incoming connections are handled by the load balancer initially, then passed off to the actual server as regular http / port 80 traffic. The internal box configuration would be similar to the above configuration examples :

Ifno SSL Isbeing used on the site at all,thenall you need istoset an HTTP virtual configuration:

<pre>

server virtual serverapp-vhost01192.168.1.106

port defaultdisable

port http sticky

bind http serverapp02-vhost01 http

Configuring the external IP to NAT to the internal virtual

Typically, you will have a firewall in front of the load balancer that actaully holds the external ip addresses. The traffic is filtered initially by the firewall, then NAT’d to the virtual ip (VIP) of the load balancer, which then handles balancing the traffic.

You will need to either establish a new external ip , or use an existing one (for instance, if you are moving from 1 web server to 2 web servers , and want to balance the traffic using the load balancer). You need to setup the external IP address, and NAT it to the internal VIP.

Verifying the configuration works

Once everything is setup properly, and the external IP is being NAT’d to the load balancer, it is time to ensure the load balancer is seeing the connections. You could do this before doing the switchover on the firewall as well, just to ensure everything looks right before actually doing the switchover.

To see the active connections being load balanced, issue the following command (replacing the servername for whichever one you want to check) :

SuperSTAR SUPPORT

Stack Star will provide a minimum 99.99% uninterrupted access to your web site, email, VPS and other related services. Should your services become unavailable for a cumulative period beyond the allowed 0.01% in any month of service, the client will receive a credit equivalent to 5% of the client’s pro-rated recurring monthly fees for that month and then an additional 5% for every additional 15 minutes the web site and/or other related services are unavailable.