cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
656
Views
15
Helpful
6
Replies

To change load balacing and add sticky

mj11
Level 3
Level 3

Hi All

I was wondering if any one could help with the following, I have an ACE module running 2.2 software and would like to change the predictor to least connections and add sticky for this,

-------snippet-------

probe http http-default
  interval 10
  passdetect interval 30
  expect status 200 200
  connection term forced

rserver host one
  ip address x.x.x.x
  inservice
rserver host two
  ip address x.x.x.x
  inservice
rserver host three
  ip address x.x.x.x
  inservice
rserver host four
  ip address x.x.x.x
  inservice

serverfarm host serverfarm
  predictor hash address source
  probe vle-http-probe
  rserver one
  rserver two
    inservice
  rserver three
    inservice
  rserver four
    inservice

class-map match-all VL10-class
  2 match virtual-address x.x.x.x any
class-map match-all VL-class
  2 match virtual-address x.x.x.x any
class-map type management match-any remote_access
  2 match protocol ssh source-address x.x.x.x
  3 match protocol telnet source-address x.x.x.x
  4 match protocol icmp any

policy-map type management first-match remote_mgmt_allow_policy
  class remote_access
    permit

policy-map type loadbalance first-match Virt_Policy
  class class-default
    serverfarm serverfarm

policy-map multi-match bv-policy
  class VL-class
    loadbalance vip inservice
    loadbalance policy Virt_Policy
    loadbalance vip icmp-reply

interface vlan 100
  access-group input ALL
  service-policy input remote_mgmt_allow_policy
  service-policy input bv-policy
  no shutdown

Any help would be very much appreciated.

Regards MJ

6 Replies 6

Gilles Dufour
Cisco Employee
Cisco Employee

Here is what you need to do :

serverfarm host serverfarm

  predictor leastconn slowstart 60

stick ip-netmask 255.255.255.255 address source STKY-SRC-IP

  serverfarm serverfarm

policy-map type loadbalance first-match Virt_Policy
  class  class-default

    sticky-serverfarm STKY-SRC-IP

However, I'm affraid you won't see much difference with your actual config.

You probably see more traffic on one rserver and are trying to correct this with predictor leastconn but still keeping stickyness.

Stickyness by its nature breaks any "predictory" algorithm.  So don't expect to see a better load distribution.

Gilles.

Hi Gilles

Thanks for the response, yes that is the problem I am seeing... Is there any way around this? Will any of the predicto's help on this?

Many thanks MJ

As I said, because of stickyness no predictor method will solve your problem.

For example, take 2 usrs.

First one opening 10 connections and 2nd one opening 1 connection.

Because of stickyness the first server gets 10 connections and the other server only 1.

If you try to split the load evenly, you break stickyness.

Also, because there are mega proxy on the internet (many users behind a single ip) doing sticky source ip can be dramatic.

If this is HTTP traffic, you should try to use sticky based on cookie.

gilles.

Hi Gilles

Thanks for your hekp on this..... looking at the configuratuion guide the following would need to be added for sticky based on cookie's....

serverfarm host serverfarm

  predictor leastconn slowstart 60

sticky http-cookie app-cookie

   cookie insert

   serverfarm serverfarm

policy-map type loadbalance first-match Virt_Policy

  class class-default

  sticky-serverfarm app-cookie

Regards MJ

This is correct.

Except for the sticky definition.

You need to give a name to the cookie and a name to the sticky group.

This can be the same name.

AceC6k2/Admin(config)# sticky http-cookie app-cookie ?
                            Enter the sticky group name (Max Size - 64)

Gilles.

Hi Gilles

Thanks for your help on this, I take it the sticky group name is not referenced any where else in the configuration then.

Regards MJ

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: