cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
927
Views
0
Helpful
2
Replies

Cisco CSS load balancing algorithm query

danielng83
Level 1
Level 1

Hi all,

I was looking at the following document on Cisco:

http://www.cisco.com/en/US/products/hw/contnetw/ps789/products_configuration_example09186a0080094964.shtml

And i have a query as to how this load balancing algorithm will work.

content LOCAL-C
  VIP address 192.168.3.6
  protocol tcp
  port 81
  url "//site-c.mycompany.com/*"
  add service C-S1
  add service C-S2
  add service C-S3
  add service C-S4
  add dns site-c.mycompany.com
  dnsbalance preferlocal
  balance leastconn
  advanced-balance sticky-srcip
  active


If the first request from client A comes in and all sessions from client A are load-balanced to service C-S1(because of advanced-balance sticky-srip), does the "least connection" algorithm kick in and only selects C-S2,C-S3 and C-S4 for the next request that hits the VIP?

Also, how is the advanced-balance sticky-srcip determined? Does it use a /32 or a /24 subnet when evaluating the source IP? Or is there a way we can specify this?

Thanks in advance!!

1 Accepted Solution

Accepted Solutions

yushimaz
Cisco Employee
Cisco Employee

Sticky feature works before the determination of balance algorithm such as least conn.

If the entry is listed on sticky table, CSS sends packet with this table.

If the request is not listed on the entry, CSS determins the destination with balance algorithm.

So, if client A accesses to the vip and C-S1 is selected, all request from client A will be

forwarded to C-S1. When the entry is purged from sticky table by sticky timeout, next

request from client A will balance with least conn algorithm.

Other client request (not listed on sticky table) will be selected least conn algorithm.

If access from client is only client A as below.

Next request from non-client A will be destined to C-S2, C-S3 or C-S4.

CSS11503# show service summary

Service Name                     State     Conn  Weight  Avg   State

                                                         Load  Transitions

C-S1                              Alive        10      1     2            0

C-S2                              Alive         0      1     2            0

C-S3                              Alive         0      1     2            0

C-S4                              Alive         0      1     2            0

If there are many access from some clients as below.

Next request from non-client A( and the entry is not listed on sticky

table) will be destined to C-S1 since C-S1 is least Conn Load.

CSS11503# show service summary

Service Name                     State     Conn  Weight  Avg   State

                                                         Load  Transitions

C-S1                              Alive        10      1     2            0

C-S2                              Alive        20      1     2            0

C-S3                              Alive        20      1     2            0

C-S4                              Alive        20      1     2            0

sticky-srcip is use /32 mask by default.

You can change the mask with sticky-mask config in content rule as below.

CSS11503-A(config-owner-content[test-test])# sticky-mask

             Ip address mask in dotted decimal (x.x.x.x)

Please refer to the following URL regarding sticky mask feature.

http://www.cisco.com/en/US/partner/docs/app_ntwk_services/data_center_app_services/css11500series/v8.10/configuration/content_lb/guide/Sticky.html#wp1044272

Regards,

Yuji

View solution in original post

2 Replies 2

yushimaz
Cisco Employee
Cisco Employee

Sticky feature works before the determination of balance algorithm such as least conn.

If the entry is listed on sticky table, CSS sends packet with this table.

If the request is not listed on the entry, CSS determins the destination with balance algorithm.

So, if client A accesses to the vip and C-S1 is selected, all request from client A will be

forwarded to C-S1. When the entry is purged from sticky table by sticky timeout, next

request from client A will balance with least conn algorithm.

Other client request (not listed on sticky table) will be selected least conn algorithm.

If access from client is only client A as below.

Next request from non-client A will be destined to C-S2, C-S3 or C-S4.

CSS11503# show service summary

Service Name                     State     Conn  Weight  Avg   State

                                                         Load  Transitions

C-S1                              Alive        10      1     2            0

C-S2                              Alive         0      1     2            0

C-S3                              Alive         0      1     2            0

C-S4                              Alive         0      1     2            0

If there are many access from some clients as below.

Next request from non-client A( and the entry is not listed on sticky

table) will be destined to C-S1 since C-S1 is least Conn Load.

CSS11503# show service summary

Service Name                     State     Conn  Weight  Avg   State

                                                         Load  Transitions

C-S1                              Alive        10      1     2            0

C-S2                              Alive        20      1     2            0

C-S3                              Alive        20      1     2            0

C-S4                              Alive        20      1     2            0

sticky-srcip is use /32 mask by default.

You can change the mask with sticky-mask config in content rule as below.

CSS11503-A(config-owner-content[test-test])# sticky-mask

             Ip address mask in dotted decimal (x.x.x.x)

Please refer to the following URL regarding sticky mask feature.

http://www.cisco.com/en/US/partner/docs/app_ntwk_services/data_center_app_services/css11500series/v8.10/configuration/content_lb/guide/Sticky.html#wp1044272

Regards,

Yuji

Thank you very much Yuji!! Definitely helped cleared my doubts!

Review Cisco Networking for a $25 gift card