cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
498
Views
5
Helpful
3
Replies

load balancing multiple serverfarms

followurself
Level 1
Level 1

access-list PERMIT_ACL line 1 extended permit ip any any

probe http port-7777

port 7777

interval 5

faildetect 15

passdetect interval 15

receive 2

expect status 200 200

open 2

probe http port-8005

Listener Port

port 8005

interval 5

faildetect 15

passdetect interval 15

receive 2

expect status 200 200

open 2

parameter-map type http http-par

persistence-rebalance

set header-maxparse-length 4096

length-exceed continue

rserver host zcgnoraapp04-Perf

ip address 10.1.40.12

inservice

rserver host zcgnoraapp05

ip address 10.1.40.13

inservice

rserver host zcgnoradb04-Perf

ip address 10.1.40.112

inservice

rserver host zcgnoradb05-Perf

ip address 10.1.40.113

inservice

serverfarm host SFarm1-Perf

probe port-7777

rserver zcgnoradb04-Perf 7777

inservice

rserver zcgnoradb05-Perf 7777

inservice

serverfarm host SFarm3-Perf

description SFARM3-Perf

probe port-7777

probe port-8005

rserver zcgnoraapp04-Perf 8005

inservice

rserver zcgnoraapp05-Perf 8005

inservice

serverfarm host SFarm6-Perf

description SFARM6-Perf

probe port-7777

probe port-8005

rserver zcgnoraapp04-Perf 7777

inservice

rserver zcgnoraapp05-Perf 7777

inservice

sticky http-cookie acecookiePerf sticky-cookie-insert-7777-Perf_SOA

cookie insert

replicate sticky

serverfarm SFarm1-Perf

sticky http-cookie acecookiePerf sticky-cookie-insert-8005-perf

cookie insert

replicate sticky

serverfarm SFarm3

sticky http-cookie acecookiePerf sticky-cookie-insert-7777-Perf

cookie insert

replicate sticky

serverfarm SFarm6

class-map match-all port_8005_perf

description Match Apache port

2 match virtual-address 10.1.90.140 tcp eq 8005

class-map match-all port_7777_perf

description Match ESB and SOA port

2 match virtual-address 10.1.90.140 tcp eq 7777

class-map match-all port_7777_perf_SOA

2 match virtual-address 10.1.90.141 tcp eq 7777

policy-map type loadbalance first-match port_7777_policy_perf_SOA

class class-default

sticky-serverfarm sticky-cookie-insert-7777-Perf_SOA

insert-http x-forward header-value "%is"

policy-map type loadbalance first-match port_7777_policy_perf_SSO

class class-default

sticky-serverfarm sticky-cookie-insert-7777-Perf

insert-http x-forward header-value "%is"

policy-map type loadbalance first-match port_8005_policy_perf

class class-default

sticky-serverfarm sticky-cookie-insert-8005-Perf

insert-http x-forward header-value "%is"

policy-map multi-match VIP

class port_7777_perf

loadbalance vip inservice

loadbalance policy port_7777_policy_perf_SSO

loadbalance vip icmp-reply active

nat dynamic 1 vlan 5

appl-parameter http advanced-options http-par

class port_7777_perf_S0A

loadbalance vip inservice

loadbalance policy port_7777_policy_perf_SOA

loadbalance vip icmp-reply active

nat dynamic 1 vlan 5

appl-parameter http advanced-options http-par

class port_8005_perf

loadbalance vip inservice

loadbalance policy port_8005_policy_perf

loadbalance vip icmp-reply active

nat dynamic 1 vlan 5

appl-parameter http advanced-options http-par

interface vlan 5

ip address 10.1.90.162 255.255.255.240

access-group input PERMIT_ACL

nat-pool 1 10.1.90.165 10.1.90.174 netmask 255.255.255.240 pat

service-policy input VIP

no shutdown

ip route 0.0.0.0 0.0.0.0 10.1.90.161

whn initiate a request for 10.1.90.140 on port 8005, the connection gets estab with the server from serverfarm1 and that too on port 7777

the connection should go to serverfarm6

whn initiate a request for 10.1.90.141 on port 8005, the connection gets estab with the server from serverfarm1 and that too on port 7777-although there is no match statment in class for this port on that vip. the connection shouldnt establish

not sure whats wrong?

3 Replies 3

You are using the same cookie-name for all sticky groups.

When sticky is in place. Sticky DB is checked first and the decision is made.

Something in the following lines should do

sticky http-cookie acecookie1 sticky-cookie-insert-7777-Perf_SOA

cookie insert

replicate sticky

serverfarm SFarm1-Perf

sticky http-cookie acecookie2 sticky-cookie-insert-8005-perf

cookie insert

replicate sticky

serverfarm SFarm3

sticky http-cookie acecookie3 sticky-cookie-insert-7777-Perf

cookie insert

replicate sticky

serverfarm SFarm6

Syed Iftekhar Ahmed

Thank You

i shall change the config and check

can you also tell me the best way to test the cookie/stickyness working

With cookie insert

On ACE use "sh sticky database static" to see if Sticky entries are created. Similarly you can use HTTP header viewers (e.g httpfox extention in Firefox) or programs like HTTPlook to see the HTTP requests and responses.

When you hit the application for the first time you should see "set cookie" in the server response with the "cookie name" you configured under sticky group and ACE generated cookie value (some thing like Rxxxx). All the subsequent requests will carry "cookie:" header in line with the "Set Cookie" you get in the response.

Thanks

Syed Iftekhar Ahmed

Review Cisco Networking for a $25 gift card