Forum Discussion

Sahir_180434's avatar
Sahir_180434
Icon for Nimbostratus rankNimbostratus
Jun 04, 2015
Solved

Least connection loadbalancing question.

Hi,

 

I am testing ltm 11.5.2HF1 least connection loadbalancing method, anyways in my test I disable a pool member in a pool that is consisted of 16 members and after few seconds when all other members get connections I go and re-enable the disabled member and the test keeps running till it's time over which is about 5min, when the test is done the members don't have equal connections.

 

by the way CMP is disabled on the VIP.

 

my question: isn't the ltm supposed to send all the connections to the disabled member after re-enabling it till it becomes equal with other members and then continue rounrobin till the test is done ?

 

your thoughts please ?

 

Thanks, Sahir

 

  • Hi Sahir, This is not bug or issue. Hope you are aware of SRT(Slow Ramp Time). Whenever you enable any pool member, f5 doesn't give all new connection to that member. Slowly f5 share load to new member. By the way difference session is just 3 now, its not bad.

     

10 Replies

  • >when the test is done the members don't have equal connections. what connection do you mean? is it current connections (not maximum or total connections)?
  • both, the current connections for the disabled member is 3 connections less that all other members which reflects on the total connections beside the missed connections when the member was disabled.
  • i do not think total connection is right stats because least connections mode is based on open connections at the time new connection is coming but current connections should be. how much difference in current connections between pool members?
  • 3 connections less, for all the members is 23, for the member that was disabled and moved to enable state is 20
  • Hi Sahir, This is not bug or issue. Hope you are aware of SRT(Slow Ramp Time). Whenever you enable any pool member, f5 doesn't give all new connection to that member. Slowly f5 share load to new member. By the way difference session is just 3 now, its not bad.

     

    • Sahir_180434's avatar
      Sahir_180434
      Icon for Nimbostratus rankNimbostratus
      Hi Samir, Actually I don't know about the SRT, I will have to read more about it, but the way you explained it makes sense now. Thanks.
  • i have not yet had an idea how to test with http traffic (short-lived connection) but it seems okay with ssh. i am running 11.6.0 hf4.

     configuration
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
    ltm virtual bar {
        cmp-enabled no
        destination 172.28.24.10:22
        ip-protocol tcp
        mask 255.255.255.255
        pool foo
        profiles {
            tcp { }
        }
        rules {
            qux
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        vs-index 19
    }
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
    ltm pool foo {
        load-balancing-mode least-connections-member
        members {
            200.200.200.101:22 {
                address 200.200.200.101
            }
            200.200.200.111:22 {
                address 200.200.200.111
            }
        }
        slow-ramp-time 0
    }
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
    ltm rule qux {
        when RULE_INIT {
      set static::pool_name "foo"
      set static::members_cmd "members -list $static::pool_name"
      set static::pool_list [eval $static::members_cmd]
      unset -nocomplain static::pool_conn
      foreach static::pool_mbr $static::pool_list {
        set static::pool_conn([lindex $static::pool_mbr 0]) 0
      }
      unset static::pool_name static::members_cmd static::pool_mbr
    }
    when LB_SELECTED {
       increase counter
      set server_ip [LB::server addr]
      incr static::pool_conn($server_ip)
    
       log
      set log_conn "client:[IP::client_addr]:[TCP::client_port] "
      foreach elm $static::pool_list {
        append log_conn "[lindex $elm 0]:$static::pool_conn([lindex $elm 0]) "
      }
      log local0. $log_conn
    }
    when CLIENT_CLOSED {
       decrease counter
      incr static::pool_conn($server_ip) -1
    }
    
     /var/log/ltm
    
    [root@ve11a:Active:In Sync] config  tail -f /var/log/ltm
    Jun  5 13:16:02 ve11a notice mcpd[8104]: 01070639:5: Pool /Common/foo member /Common/200.200.200.111:22 session status forced disabled.
    Jun  5 13:16:24 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59163 200.200.200.111:0 200.200.200.101:1
    Jun  5 13:16:37 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59167 200.200.200.111:0 200.200.200.101:2
    Jun  5 13:16:46 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59169 200.200.200.111:0 200.200.200.101:3
    Jun  5 13:16:55 ve11a notice mcpd[8104]: 01070639:5: Pool /Common/foo member /Common/200.200.200.111:22 session status enabled.
    Jun  5 13:17:02 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59174 200.200.200.111:1 200.200.200.101:3
    Jun  5 13:17:10 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59177 200.200.200.111:2 200.200.200.101:3
    Jun  5 13:17:17 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59179 200.200.200.111:3 200.200.200.101:3
    Jun  5 13:17:24 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59182 200.200.200.111:3 200.200.200.101:4
    Jun  5 13:17:31 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59185 200.200.200.111:4 200.200.200.101:4
    
    • Sahir_180434's avatar
      Sahir_180434
      Icon for Nimbostratus rankNimbostratus
      I am using Ixia server, you can create different type of tests according to your needs. Thanks
  • i have not yet had an idea how to test with http traffic (short-lived connection) but it seems okay with ssh. i am running 11.6.0 hf4.

     configuration
    
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
    ltm virtual bar {
        cmp-enabled no
        destination 172.28.24.10:22
        ip-protocol tcp
        mask 255.255.255.255
        pool foo
        profiles {
            tcp { }
        }
        rules {
            qux
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        vs-index 19
    }
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
    ltm pool foo {
        load-balancing-mode least-connections-member
        members {
            200.200.200.101:22 {
                address 200.200.200.101
            }
            200.200.200.111:22 {
                address 200.200.200.111
            }
        }
        slow-ramp-time 0
    }
    root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
    ltm rule qux {
        when RULE_INIT {
      set static::pool_name "foo"
      set static::members_cmd "members -list $static::pool_name"
      set static::pool_list [eval $static::members_cmd]
      unset -nocomplain static::pool_conn
      foreach static::pool_mbr $static::pool_list {
        set static::pool_conn([lindex $static::pool_mbr 0]) 0
      }
      unset static::pool_name static::members_cmd static::pool_mbr
    }
    when LB_SELECTED {
       increase counter
      set server_ip [LB::server addr]
      incr static::pool_conn($server_ip)
    
       log
      set log_conn "client:[IP::client_addr]:[TCP::client_port] "
      foreach elm $static::pool_list {
        append log_conn "[lindex $elm 0]:$static::pool_conn([lindex $elm 0]) "
      }
      log local0. $log_conn
    }
    when CLIENT_CLOSED {
       decrease counter
      incr static::pool_conn($server_ip) -1
    }
    
     /var/log/ltm
    
    [root@ve11a:Active:In Sync] config  tail -f /var/log/ltm
    Jun  5 13:16:02 ve11a notice mcpd[8104]: 01070639:5: Pool /Common/foo member /Common/200.200.200.111:22 session status forced disabled.
    Jun  5 13:16:24 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59163 200.200.200.111:0 200.200.200.101:1
    Jun  5 13:16:37 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59167 200.200.200.111:0 200.200.200.101:2
    Jun  5 13:16:46 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59169 200.200.200.111:0 200.200.200.101:3
    Jun  5 13:16:55 ve11a notice mcpd[8104]: 01070639:5: Pool /Common/foo member /Common/200.200.200.111:22 session status enabled.
    Jun  5 13:17:02 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59174 200.200.200.111:1 200.200.200.101:3
    Jun  5 13:17:10 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59177 200.200.200.111:2 200.200.200.101:3
    Jun  5 13:17:17 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59179 200.200.200.111:3 200.200.200.101:3
    Jun  5 13:17:24 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59182 200.200.200.111:3 200.200.200.101:4
    Jun  5 13:17:31 ve11a info tmm[30284]: Rule /Common/qux : client:192.168.206.117:59185 200.200.200.111:4 200.200.200.101:4
    
    • Sahir_180434's avatar
      Sahir_180434
      Icon for Nimbostratus rankNimbostratus
      I am using Ixia server, you can create different type of tests according to your needs. Thanks