{"id":748,"date":"2013-03-01T00:00:00","date_gmt":"2013-03-01T00:00:00","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2013\/03\/01\/dynamic-weighted\/"},"modified":"2021-07-24T18:06:50","modified_gmt":"2021-07-24T18:06:50","slug":"dynamic-weighted","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/Loadbalancers\/Brocade\/dynamic-weighted.html","title":{"rendered":"Brocade ADX – The Dynamic Weighted Predictor"},"content":{"rendered":"
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.<\/p>\n
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.<\/p>\n
Note<\/em> : With both methods the higher the SNMP-weight value the more traffic that is sent to the server.<\/p>\n Direct<\/strong> – 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. The configuration steps below are for Dynamic Weighted Direct. As you can see the syntax is pretty straight forward.<\/p>\n Note<\/em> : 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.) From the ADX you can see the SNMP Weight of the server via a ‘show server real’.<\/p>\n 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).<\/p>\n","protected":false},"excerpt":{"rendered":" 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. Summary The Dynamic Weighted balancing method is a dynamic predictor that allows you to distribute traffic based upon the resource usage of your server (such … Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"yoast_head":"\n
Reverse<\/strong> -The SNMP-weight is calculated by subtracting the max. based value from the SNMP response (max. based value \u2013 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).<\/p>\nConfiguration<\/strong><\/h2>\n
server snmp-poll 5 <-- poll every 5 minutes
server real 172.16.1.1-web1 172.16.1.1
weight 100
port 80
port 80 keepalive
snmp-request community commstring port 161 <-- define a community string and which port to use.
snmp-request oid 1 1.3.6.1.4.1.2021.11.11.0 <-- define the oid that will be polled.
server real 172.16.1.2-web2 172.16.1.2
weight 100
port 80
port 80 keepalive
snmp-request community commstring port 161
snmp-request oid 1 1.3.6.1.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
port 80
bind 80 172.16.1.1-web1 80
bind 80 192.168.200.121-web2 80<\/pre>\n
This can lead to the server reporting a bad OID and in turn no value being returned.<\/p>\nTroubleshooting<\/strong><\/h2>\n
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
HLD:held-down
Name: 172.16.1.1-web1 State: Active Cost: 0 IP:192.168.200.111: 1
Mac: d4ae.13ab.4014 SNMP_Weight: 69\/1<\/span> 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<\/pre>\n