Brocade ADX - The Dynamic Weighted Predictor
The ADX provides a number of loadbalancing methods (also known as predictors) such as round robin and least connections.
Within this article we will look at the Dynamic Weighted loadbalancing method.
The Dynamic Weighted balancing method is a dynamic predictor that allows you to distribute traffic based upon the resource usage of your server (such as CPU or memory). This information is retrieved from the server via SNMP (Simple Network Management Protocol).
There are 2 configuration methods for the Dynamic Weighted predictor. They are direct and reverse.
Note : With both methods the higher the SNMP-weight value the more traffic that is sent to the server.
Direct - The SNMP-weight is calculated directly using the SNMP response. i.e if the CPU idle value is polled, which returns 80%, then the SNMP-weight of the server is dynamically set to 80. Note : if the ADX is unable to poll the server then the SNMP-weight is set to 0. Because of this, a weight is set on the server of 100.
Reverse -The SNMP-weight is calculated by subtracting the max. based value from the SNMP response (max. based value – SNMP response = SNMP-weight value). The max value is set on each server. i.e if the CPU usage is polled, which returns 20% and the max weight is 100, then the SNMP-weight of the server is dynamically set to 80 (100 - 20 = 80).
The configuration steps below are for Dynamic Weighted Direct. As you can see the syntax is pretty straight forward.
server snmp-poll 5 <-- poll every 5 minutes
server real 172.16.1.1-web1 172.16.1.1
port 80 keepalive
snmp-request community commstring port 161 <-- define a community string and which port to use.
snmp-request oid 1 18.104.22.168.4.1.2021.11.11.0 <-- define the oid that will be polled.
server real 172.16.1.2-web2 172.16.1.2
port 80 keepalive
snmp-request community commstring port 161
snmp-request oid 1 22.214.171.124.4.1.2021.11.11.0
server virtual VIP_192.168.1.100 192.168.1.100
predictor dynamic-weighted direct oid 1 <-- set the predictor
bind 80 172.16.1.1-web1 80
bind 80 192.168.200.121-web2 80
Note : If you place a . (dot) at the front of your OID the ADX will prepend a zero to the front when sending the SNMP poll (i.e .1.3.6. would be 0.1.3.6.)
This can lead to the server reporting a bad OID and in turn no value being returned.
From the ADX you can see the SNMP Weight of the server via a 'show server real'.
SSH@adx#sh server real 172.16.1.1-web1
Real Servers Info
State(St) - ACT:active, ENB:enabled, FAL:failed, TST:test, DIS:disabled,
UNK:unknown, UNB:unbind, AWU:await-unbind, AWD:await-delete
Name: 172.16.1.1-web1 State: Active Cost: 0 IP:192.168.200.111: 1
Mac: d4ae.13ab.4014 SNMP_Weight: 69/1 MaxConn: n/a
SrcNAT: not-cfg, not-op DstNAT: not-cfg, not-op Serv-Rsts: 0
Rx throughput: 0 Kbps Tx throughput: 0 Kbps
tcp conn rate:udp conn rate = 0:0, max tcp conn rate:max udp conn rate = 62:0
BP max local conn configured No: 0 0 0 0 0 0
BP max conn percentage configured No: 0 0 0 0 0 0
Use local conn : No
SIP current TCP connections = 0
Port St Ms CurConn TotConn Rx-pkts Tx-pkts Rx-octet Tx-octet Reas
---- -- -- ------- ------- ------- ------- -------- -------- ----
default UNB 0 0 0 0 0 0 0 0
http ACT 0 0 167 8462 6583 5371671 964845 0
Server Total 0 701 15881 14210 9853633 2215037 0
However if you need to troubleshoot SNMP it is recommended that you first of all ensure the port is listening on the server, if so then to run a packet capture either on the server of from the ADX (via a debug filter).