beautypg.com

Usage example – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual

Page 297

background image

Brocade Virtual ADX Server Load Balancing Guide

281

53-1003247-01

Server and server port persistence with CSW nested rules

5

Usage example

The customer needs the following request:

Two real servers, 192.168.1.100 and 192.168.1.101.

Each server has a different application listening on different ports: 10500 and 10520.

Each server is configured to a different group, 30 and 31.

The request with “pweb” and “jsession=groupid”embedded in the URL is directed to the
specified group.

The configuration is as follows.

For configuring the real server, enter the following commands:

Virtual ADX(config)#server real-name-or-ip rs1 192.168.1.100

Virtual ADX(config-rs-rs1)#port 10500 group-id 20 20 30 30

Virtual ADX(config-rs-rs1)#port 10520 group-id 21 21 30 30

Virtual ADX(config-rs-rs1)#exit

Virtual ADX(config)#server real-name-or-ip rs2 192.168.1.101

Virtual ADX(config-rs-rs2)#port 10500 group-id 20 20 31 31

Virtual ADX(config-rs-rs2)#port 10520 group-id 21 21 31 31

Virtual ADX(config-rs-rs2)#exit

For configuring the CSW rule, enter the following commands:

Virtual ADX(config)#csw-rule r1 url pattern "pweb"

Virtual ADX(config)#csw-rule r2 url pattern "jsession="

Virtual ADX(config)#csw-rule n1 nested-rule "r1&&r2" master-rule r2

For configuring the CSW policy, enter the following commands:

Virtual ADX(config)#csw-policy p1

Virtual ADX(config-csw-p1)#match n1 persist offset 0 length 2

group-or-server-id real-port 10500

For configuring the virtual server, enter the following commands:

Virtual ADX(config)#server virtual-name-or-ip vip1 10.10.10.100

Virtual ADX(config-vs-vip1)#bind http rs1 10500 rs1 10520

Virtual ADX(config-vs-vip1)#bind http rs2 10500 rs2 10520

Virtual ADX(config-vs-vip1)#port http csw-policy p1

The result of the configuration is if the request has the string "pweb" and also string "/jsession=30"
embedded in the url, Then the rule n1 will be matched and the Brocade Virtual ADX will choose to
connect to the rs1 (group 30) and the port 10500

If the port 10500 on rs1 is not available, the client request fails over to the port 10500 on rs2.