cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1388
Views
0
Helpful
5
Replies

ACE 4710 Redirect to Different Server Farm based on URL

I have a weblogic 11 serverfarm where i want to redirect to a different serverfarm based on the URL. I am able to do it and it appears to be working however I am having issues with the cookies. I seem to be getting logged out of our App when switching between the serverfarms. Is there any way to fix this issue? My configuration is below.

 

 

Thanks!

-Andy

 

Generating configuration....

 

 

crypto chaingroup WWW-PROD-CHAINGROUP
  cert AddTrustExternalCARoot.crt
  cert COMODOHigh-AssuranceSecureServerCA.crt


access-list allow line 8 extended permit ip any any 

 

probe http HTTP_PROBE
  port 7001
  interval 10
  passdetect interval 5
  request method get url /login.jsp
  expect status 200 299
  connection term forced
probe icmp PROBE_SERVICE_ICMP
  interval 5
  passdetect interval 5
  receive 5
probe tcp TCP7001_PROBE
  port 7005
  interval 5
  passdetect interval 5
  receive 3
  connection term forced
  open 2

rserver redirect REDIRECT-TO-HTTPS
  webhost-redirection https://%h%p 301
  inservice
rserver host WLS11Host1
  ip address 192.168.211.250
  inservice
rserver host WLS11Host2
  ip address 192.168.211.14
  inservice
                                                                                                                                                                                                                                                                               
serverfarm redirect REDIRECT-SERVERFARM                                                                                                                                                                                                                                        
  rserver REDIRECT-TO-HTTPS                                                                                                                                                                                                                                                    
    inservice                                                                                                                                                                                                                                                                  
serverfarm host SPEND-FARM                                                                                                                                                                                                                                                     
  probe HTTP_PROBE                                                                                                                                                                                                                                                             
  rserver WLS11Host1 7001                                                                                                                                                                                                                                                      
    inservice                                                                                                                                                                                                                                                                  
serverfarm host WLS11FARM                                                                                                                                                                                                                                                      
  probe HTTP_PROBE                                                                                                                                                                                                                                                             
  rserver WLS11Host2 7001                                                                                                                                                                                                                                                      
    inservice                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                               
parameter-map type http HTTP-PARM                                                                                                                                                                                                                                              
  persistence-rebalance                                                                                                                                                                                                                                                        
  set secondary-cookie-start none                                                                                                                                                                                                                                              
parameter-map type http PARSE                                                                                                                                                                                                                                                  
  persistence-rebalance                                                                                                                                                                                                                                                        
  set header-maxparse-length 8192                                                                                                                                                                                                                                              
  length-exceed continue                                                                                                                                                                                                                                                       
parameter-map type ssl SSL_MAP                                                                                                                                                                                                                                                 
  cipher RSA_WITH_RC4_128_MD5                                                                                                                                                                                                                                                  
  cipher RSA_WITH_RC4_128_SHA                                                                                                                                                                                                                                                  
  cipher RSA_WITH_3DES_EDE_CBC_SHA                                                                                                                                                                                                                                             
  cipher RSA_WITH_AES_128_CBC_SHA                                                                                                                                                                                                                                              
  cipher RSA_WITH_AES_256_CBC_SHA                                                                                                                                                                                                                                              

sticky http-cookie ACE_COOKIE-7001 7001_STICKY
  cookie insert browser-expire
  serverfarm WLS11FARM
  replicate sticky
sticky http-cookie ACE-COOKIE-SPEND SPEND_STICKY
  cookie insert browser-expire
  serverfarm SPEND-FARM
  replicate sticky


ssl-proxy service WWW-PROD-SSLPROXY
  key client_ssl.pem
  cert pastar.crt
  chaingroup WWW-PROD-CHAINGROUP
  ssl advanced-options SSL_MAP

class-map type http loadbalance match-any HTTP-MARKETING
  2 match http url /index.html
class-map type http loadbalance match-any HTTPS-SPEND
  2 match http url /spend/.*
class-map type http loadbalance match-any L5
  2 match http url /.*
class-map match-all WLS-7001-CLASS
  2 match virtual-address 192.168.215.28 tcp eq www
class-map match-all WLS11-HTTPS-CLASS
  2 match virtual-address 192.168.215.28 tcp eq https

policy-map type loadbalance first-match HTTPS
  class HTTPS-SPEND
    sticky-serverfarm SPEND_STICKY
    insert-http x-forward header-value "%is"
  class L5
    sticky-serverfarm 7001_STICKY
    insert-http x-forward header-value "%is"
policy-map type loadbalance first-match WLS11-7001-Policy
  class HTTP-MARKETING
    sticky-serverfarm 7001_STICKY
    insert-http x-forward header-value "%is"
  class HTTPS-SPEND
    serverfarm REDIRECT-SERVERFARM
  class L5
    serverfarm REDIRECT-SERVERFARM

policy-map multi-match WLS11-SLB
  class WLS-7001-CLASS
    loadbalance vip inservice
    loadbalance policy WLS11-7001-Policy
    loadbalance vip icmp-reply active
    nat dynamic 1 vlan 1000
    appl-parameter http advanced-options HTTP-PARM
  class WLS11-HTTPS-CLASS
    loadbalance vip inservice
    loadbalance policy HTTPS
    loadbalance vip icmp-reply active
    nat dynamic 1 vlan 1000
    appl-parameter http advanced-options PARSE
    ssl-proxy server WWW-PROD-SSLPROXY

interface vlan 1000
  ip address 192.168.215.27 255.255.255.0
  access-group input allow
  nat-pool 1 192.168.215.28 192.168.215.28 netmask 255.255.255.255 pat
  service-policy input WLS11-SLB
  no shutdown

ip route 0.0.0.0 0.0.0.0 192.168.215.1

snmp-server community poweradvocaterw group Network-Monitor

5 Replies 5

Kanwaljeet Singh
Cisco Employee
Cisco Employee

Hi,

Your configuration looks fine. I assume that you get to a serverfarm because of your "HTTP-Marketing" class map classification and then while browsing you get redirected to HTTPS because of your SPEND or L5 classification and your connection breaks because you are getting loadbalanced to a different serverfarm. Is that correct? Do you know if the user is coming with same cookie even after the redirection?

Regards,

Kanwal

The browser is displaying both cookies for the site the ACE_COOKIE-7001 and the ACE-COOKIE-SPEND. I am assuming they are retaining both cookies.

Hi,

So when you come with " http url /index.html", you go to "sticky-serverfarm 7001_STICKY" and ACE must be inserting sticky "ACE_COOKIE-7001". Now when you get redirected because you match "HTTPS-Spend", ACE will loadbalance the request which will now come on HTTPS and insert sticky " ACE-COOKIE-SPEND".  That's why i guess you see two sticky entries. Now i guess ACE will keep the connection to servers in  "sticky-serverfarm SPEND_STICKY" or you see that ACE is not doing the same or you expected the ACE to send the requested to "sticky-serverfarm 7001_STICKY" even though it matches the HTTPS-Spend class-map condition?

 

Regards,

Kanwal

the challenge is that switching between the serverfarms (leaving the /spend url or going back) i occassionally have my session logged out. its as though it doesnt see the cookie anymore.

Hi,

I would suggest opening a TAC and get this looked at. It would need detailed analysis to see what exactly is going on.

Regards,

Kanwal

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: