Accessibility

ColdFusion Article

Integrating Cisco Content Services Switch at Multitiers with ColdFusion MX 6.1 or JRun 4

Frank DeRienzo

Frank DeRienzo

Macromedia, Inc.


Brandon Purcell

Brandon Purcell

Macromedia, Inc.

This article offers you an additional hardware load balancing option based on the distributed server staging model in the article: Implementing Multitier Hardware Load Balancing with ColdFusion MX for J2EE or JRun, by Brandon Purcell, senior product support engineer for server products.

The Cisco Content Services Switch (CSS) offers advanced content-aware and application-aware load-balancing; it has replaced the Cisco Local Director (CLD). The following procedure describes how to configure CSS to balance and direct all session traffic on a distributed website (with web servers and application servers hosted on separate platforms). In this model, you use CSS in front of the web servers, where you host all static content, and you use CSS in front of the application servers, where you host all dynamic content (see Figure 1 below).

The procedure for configuring CSS to balance and direct all session traffic on a distributed website.

Figure 1: The procedure for configuring CSS to balance and direct all session traffic on a distributed website.

(+)View larger

Configuring the Distributed Server Environment

The model in Figure 1 delegates all load balancing to the CSS; it does not use the JRun connector. Traffic hits the Virtual IP Address (VIP) on the CSS in front of the web servers. The VIP directs the traffic to the web servers where it serves all static content. A redirection filter on the web server channels all requests for dynamic content to a second VIP on the CSS, which in turn directs the traffic back to the application servers.

This waterfall effect creates speed and a robust environment under significant load. For detailed information on the ColdFusion/JRun and web server configuration in this unique distributed server environment, read Implementing Multitier Hardware Load Balancing with ColdFusion MX for J2EE or JRun. The server configuration in this article differs from the configuration outlined in Implementing Multitier Hardware Load Balancing with ColdFusion MX for J2EE or JRun, only in that CSS is a router, so the default gateway for web and application servers is the internal IP address on the CSS. The database server in this model is multi-homed for easy management and to give you the possibility of using it with a different default gateway.

Note: The keepalive URI points to a piece of content on the website. This can be a simple page that says the word hello, or it can be any dynamic page you choose. If this page becomes unavailable, then the CSS will mark that server as down and redirect traffic to the other server where the keepalive URI is successful. The HEAD keepalive is used for dynamic content and the GET keepalive is used for static content. The GET keepalive has a tendency to fail when used against ColdFusion content, even when it is used to probe very simple dynamic content. The HEAD keepalive is a reliable means of monitoring the health and availability of a ColdFusion application.

Configuring CSS

CSS is different from CLD: CLD is a bridge and CSS is a router. For detailed information on the difference between these two load balancing platforms, see the following article. If you are upgrading from CLD to CSS at the same time you're upgrading to ColdFusion MX 6.1, then you will need to carefully consider how to change your network topology from bridging to routing. This article combines the two in a creative way. If you compare the IP addresses on the web servers and application server in Figure 1 above, you will see that they are all on the same subnet; however if you examine the virtual IP addresses (VIPs) on the CSS, you will see that they are on different subnets. The CSS configuration to support Figure 1's model is exhaustively illustrated below using the CSS commands: show run, show service, show circuit, and show rule.

CSS11050(config)# show run

************* GLOBAL ********** 

ip route 0.0.0.0 0.0.0.0 10.10.10.3 1 

************ INTERFACE *********

interface e2 bridge vlan 2
interface e3 bridge vlan 2
interface e4 bridge vlan 2
interface e5 bridge vlan 2
interface e6 bridge vlan 2
interface e7 bridge vlan 2 

!********** CIRCUIT ***************

circuit VLAN1
ip address 10.10.10.2 255.255.255.248 

circuit VLAN2
ip address 10.15.1.44 255.255.255.224 

*********** SERVICE ***************

service app1
ip address 10.15.1.34
protocol tcp
port 8500
keepalive uri "/cfprobe.cfm" 
keepalive port 8500
string app1
keepalive type http
active 

service app2
ip address 10.15.1.34
protocol tcp
keepalive uri "/cfprobe.cfm"
port 8600 
keepalive port 8600 
string app2 
keepalive type http 
active 

service app3
ip address 10.15.1.43
protocol tcp
port 8500
keepalive port 8500
keepalive uri "/cfprobe.cfm"
string app3 
keepalive type http
active 

service app4
protocol tcp
port 8600
keepalive port 8600
keepalive uri "/cfprobe.cfm"
string app4
ip address 10.15.1.43
keepalive type http
active 

service www1
ip address 10.15.1.39
keepalive method get
keepalive uri "/default.html" 
keepalive type http 
active 

service www2
ip address 10.15.1.36 
keepalive method get 
keepalive uri "/default.html" 
keepalive type http 
active 

!********** OWNER *****************

owner j2ee
content app
vip address 10.15.1.41 
add service app1
add service app2 
add service app3 
add service app4 
protocol tcp 
port 8100 
advanced-balance arrowpoint-cookie 
active 

content www 
vip address 10.10.10.1
add service www1 
add service www2 
protocol tcp 
port 80 
active 

!************** GROUP ************
group test1 
add service app1 
add service app2
add service app3
add service app4
add service www1 
add service www2
vip address 10.10.10.1
active 

CSS11050(config)# show service

Services (7 entries):

Name: app1       Index: 1
Type: Local        State: Alive
Rule ( 10.15.1.34 TCP 8500 ) 
Redirect Domain:
Redirect String: 
Keepalive: (HTTP:HEAD:/cfprobe.cfm 5 3 5 ) 
Keepalive Error: General failure 
Last Clearing of Stats Counters: 11/21/2003 10:36:58
Mtu:     1500                   State Transitions:        0 
Connections: 0                 Max Connections: 0 
Total Connections: 0        Total Reused Conns: 0 
Weight: 1                         Load: 2 String: app1

Name: app2      Index: 2
Type: Local        State: Alive
Rule ( 10.15.1.34 TCP 8600 ) 
Redirect Domain:
Redirect String: 
Keepalive: (HTTP:HEAD:/cfprobe.cfm 5 3 5 ) 
Last Clearing of Stats Counters: 11/21/2003 10:36:58
Mtu:     1500                   State Transitions:        0 
Connections: 0                 Max Connections: 0 
Total Connections: 0        Total Reused Conns: 0 
Weight: 1                         Load: 2 String: app2

Name: app3      Index: 3
Type: Local        State: Alive
Rule ( 10.15.1.43 TCP 8500 ) 
Redirect Domain:
Redirect String: 
Keepalive: (HTTP:HEAD:/cfprobe.cfm 5 3 5 ) 
Last Clearing of Stats Counters: 11/21/2003 10:36:58
Mtu:     1500                   State Transitions:        0 
Connections: 0                 Max Connections: 0 
Total Connections: 0        Total Reused Conns: 0 
Weight: 1                         Load: 2  String: app3


Name: app4      Index: 4
Type: Local       State: Alive
Rule ( 10.15.1.43 TCP 8600 ) 
Redirect Domain:
Redirect String: 
Keepalive: (HTTP:HEAD:/cfprobe.cfm 5 3 5 ) 
Last Clearing of Stats Counters: 11/21/2003 10:36:58
Mtu:     1500                   State Transitions:        0 
Connections: 0                 Max Connections: 0 
Total Connections: 0        Total Reused Conns: 0 
Weight: 1                         Load: 2  String: app4

Name: www1      Index: 5
Type: Local         State: Alive 
Rule ( 10.15.1.39 ANY ANY )
Redirect Domain:      Redirect String: 
Keepalive: (HTTP:GET:/default.html 5 3 5 ) 
Keepalive Hash: 956bdbb7be252b9cb3ac1117dcd0bcb9 
Last Clearing of Stats Counters: 11/21/2003 10:36:58 
Mtu: 1500           State Transitions: 0 
Connections: 0     Max Connections: 0
Total Connections: 0     Total Reused Conns: 0 
Weight: 1             Load: 2

Name: www1      Index: 6
Type: Local         State: Alive 
Rule ( 10.15.1.36 ANY ANY )
Redirect Domain:      Redirect String: 
Keepalive: (HTTP:GET:/default.html 5 3 5 ) 
Keepalive Hash: 956bdbb7be252b9cb3ac1117dcd0bcb9 
Last Clearing of Stats Counters: 11/21/2003 10:36:58 
Mtu: 1500           State Transitions: 0 
Connections: 0     Max Connections: 0
Total Connections: 0     Total Reused Conns: 0 
Weight: 1             Load: 2


CSS11050(config)# show circuit 
lCircuit name      Circuit State           IP Address              Interface(s)      Operational Status
------------        -------------          ---------------        ------------       ------------
VLAN1           active-ipEnabled      10.10.10.2               e1                        Up 
VLAN2           active-ipEnabled      10.15.1.44               e5                        Up 
                                                                                       e4                        Up 
                                                                                       e3                        Up 
                                                                                       e2                        Up 


CSS11050(config)# show rule
Content Rules:
Name: app                        Owner: j2ee
State: Active                      Type: HTTP
Balance: Round Robin        Failover: N/A
Persistence: Enabled          Param-Bypass: Disabled
IP Redundancy:                 Not Redundant
L3:        10.15.1.41
L4:        TCP/8100
Url: Redirect: ""
TCP RST client if service unreachable: Disabled
Rule Services:
1: app1-Down 
2: app2-Down 
3: app3-Alive 
4: app4-Alive

>>>>>>>>

Name: www                  Owner: j2ee
State: Active                  Type: HTTP
Balance: Round Robin   Failover: N/A
Persistence: Enabled      Param-Bypass: Disabled
IP Redundancy: Not Redundant
L3:        10.10.10.1
L4:        TCP/80
Url: 
Redirect: ""
TCP RST client if service unreachable: Disabled
Rule Services:
1: www1-Alive 
2: www2-Alive 

CSS11050(config)#

The distributed server environment opens up many different options for the robust configuration of enterprise websites. You can get rid of the limitations of software-based load balancing options in the distributed server environment by creatively implementing hardware-based options. You can shift this model in a number of ways: you can combine software-based options with hardware so that the CSS balances traffic in front of the web servers and the JRun connector balances traffic (from the web servers back to the application servers). Another option on this theme is to use multiple CSS platforms rather than a single platform; this would enable you to route traffic from DMZ-based web servers back to internally hosted application servers. The distributed environment opens up many different configuration options. The one presented above combines robustness and economy by using a single switch (or a failover pair) to provide load balancing at two layers.


About the author

Prior to joining BrightTiger/Allaire/Macromedia in June 1997, Frank S. DeRienzo had a distinguished military career with the US Army Rangers and Special Forces. He is a graduate of US Army Command and General Staff College and holds an MBA from U-Mass. During his tenure with Macromedia, he has focused on high availability and scalability through website clustering and web server integration with various hardware load-balancing and content-management platforms. Currently he is part of the Strategic Onsite Services team.

Brandon Purcell is a Principal Engineer at Macromedia with over seven years of experience with developing, maintaining, and supporting web-based applications. Brandon has been working with ColdFusion for over six years and has over two years of experience with J2EE and Macromedia JRun.