Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual
Page 172
![background image](/manuals/361724/172/background.png)
156
Brocade Virtual ADX Server Load Balancing Guide
53-1003247-01
Stateless TCP and UDP ports
3
Syntax: [no] port tcp/udp-portnum stateless
The tcp/udp-portnum variable specifies the application port you want to make stateless.
Disabling the stateless SLB hashing algorithm for UDP ports
By default, stateless SLB uses a hashing algorithm to select a real server. The Brocade Virtual ADX
calculates a hash value for a given client request based on the request’s source IP address and
source TCP/UDP port. The request is sent to a real server corresponding to this hash value.
For UDP connections consisting of one client packet and one server response packet, you can
disable the stateless SLB hashing algorithm. When the stateless SLB hashing algorithm is disabled
for UDP ports, the Brocade Virtual ADX uses the round-robin load balancing method to select a real
server for the request. In this case, the Brocade Virtual ADX load balances UDP packets destined
for the VIP without creating a session and without calculating hash values based on UDP port
number and source IP address.
DNS is an example of a UDP port where this feature can be used. The advantage of disabling the
stateless SLB hashing algorithm is that a new real server can be selected immediately after it is
brought up.
For example, to disable the stateless SLB hashing algorithm for the DNS port (UDP port 53), enter
commands such as the following:
Virtual ADX(config)#server virtual-name-or-ip Stateless 192.168.4.69
Virtual ADX(config-vs-Stateless)#port dns stateless no-hash
Syntax: [no] port udp-portnum stateless no-hash
NOTES:
When this command is applied, in some cases it will not take affect. This occurs if the
sessions are stuck and it requires you to clear the sessions first and then apply the command, as
described in the following.
1. Disable the real server and unbind the VIP.
2. Clear the sessions using the clear server sessions real server name command.
3. Apply the stateless no-hash command, bind the real servers to the VIP and enable the real
server.
Configuring a port to be both stateless and stateful
You can use the stateless option when configuring an application port on a virtual server to make
that port stateless. By default, the port is stateless for both TCP and UDP. You can also specify the
protocol for which you want the port to be stateless. For example, you can configure port DNS to be
stateless for TCP while remaining stateful for UDP, by entering commands such as the following.
Virtual ADX(config)#server real R1 10.10.10.1
Virtual ADX(config-rs-R1)#port http
Virtual ADX(config-rs-R1)#exit
Virtual ADX(config)#server real R2 10.10.11.1
Virtual ADX(config-rs-R2)#port http
Virtual ADX(config-rs-R2)#exit
Virtual ADX(config)#server virtual-name-or-ip StatelessDNS 192.168.4.69
Virtual ADX(config-vs-StatelessDNS)#port dns stateless tcp
Virtual ADX(config-vs-StatelessDNS)#bind dns R1 dns
Virtual ADX(config-vs-StatelessDNS)#bind dns R2 dns
Syntax: [no] port tcp/udp-port [stateless [tcp | udp] [no-hash]]