cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1883
Views
50
Helpful
26
Replies

ace stickyness

followurself
Level 1
Level 1

need help to understand what sticky entries are expected to be seen under show sticky database and for all it options.

we are not sure what cookie values are used by the servers. if i understood right

if servers dont send any cookie , then ACE will use the configured static cookie value and send the cookie to client on behalf of the server. if ace receives the cookie value from server then it forwards the info to the client. in this situation what configuration is required to maintain stickyness

below is my config..

sticky http-cookie sfarm1-sticky sticky-cookie-insert-8005

cookie insert

replicate sticky

serverfarm sfarm1-apache

policy-map type loadbalance first-match sfarm1-apache-8000_pol

class class-default

sticky-serverfarm sticky-cookie-insert-8005

policy-map multi-match VIPS

class sfarm1-apache-8000-cl

loadbalance vip inservice

loadbalance policy sfarm1-apache-8000_pol

loadbalance vip icmp-reply active

Thanks

26 Replies 26

followurself
Level 1
Level 1

this config is to support oracle ebusiness suite. if understood correctly The http-cookie name sfarm1-sticky, ACE will learn cookie values if the cookie name is matched when any oracle server response. is this the case? does the cookie name to be matched with cookies names used by oracle suit and configured within ACE? are there any standard names to b used

thnx

If the cookie insert feature is enabled for any sticky group,

then ACE will generate "unique random value" for all the reals

in the serverfarm configured under the sticky group & inserts that value

in all the server's response, before forwarding the response to the client.

For example in your case

sticky http-cookie sfarm1-sticky sticky-cookie-insert-8005

cookie insert

replicate sticky

serverfarm sfarm1-apache

for all the response from a server in the serverfarm "sfarm1-apache",

ACE will insert the Set-Cookie header as "Set-Cookie: sfarm1-sticky=R3015567854".

The random value "R3015567854" will be different for the other rservers in the sfarm1-apache serverfarm and will be a unique one.

The cookie-insert feature creates a static cookie.

Static cookies are not visble with show sticky database command

You will need to use

"show sticky database static"

HTH

Syed Iftekhar Ahmed

Many Thanks for the reply

so that means when the server replies with a cookie name , ACE replaces that with the configured cookie name and generate a random cookie value

for example

if in our case server replies with set-cookie:oracle.com=R376589467, this will be learnt by the ACE and it will replace the cookiename with set-cookie:sfarm1-sticky=R3015567854.

in that case we dont need to know what cookie names are used by the server.

secondly , the example where Set-Cookie: sfarm1-sticky=R3015567854 is generated by ACE.

so for e.g. if we have 3 severs ACE will generate 3 different cookie values for 3 different servers

e.g.

for server 1 -- sfarm1-sticky=R3015567854

for server 2 ---sfarm1-sticky=R3015567855

for server 3---sfarm1-sticky=R3015567854

will the cookie values be always the same or will they get changed.

we are running ACE ersion 3.0(0)A1(4a),when i type show sticky database static, can see all the static cookie value created, though when i type sh sticky database client (ip address) , dont see any entry.

we are having issues where users expereience a blank white page, and when they refresh they get the page. DB team think its cookie issue. we areplanning to upgrade ACE

any ideas

The cookie insert feature work indepently from the server response.

We do not remove or change any cookie the server might be generating.

All we do is add our own cookie to the server response.

For the client browser this appears is if the cookie was sent/created by the server itself.

The value we insert in the cookie is not random. This is a hash of the serverfarm name + rserver name + port.

The result of the hash is preceeded with a 'R' which forms the cookie value.

The next release A2(1.4) will actually show for each server the associated cookie value.

The 'show stick data client' only applies to dynamic stickyness based on sticky source ip.

Do a 'show conn address ...' if you want to see where your client is connected.

Gilles.

Thanks for the response

appreciate if further clarification is made

with our config

for e.g where the cookie name is sfarm1-sticky configured within ACE

when server replies with set-cookie:oracle.com=R376589467, ACE will add the hash of serverfarm+rserver+port to set-cookie:oracle.com=R688770736, the cookie value is changed, the client receives this response.

in this case what happens to the cookie name sfarm1-sticky?

apart from show sticky database static no other commands for show sticky database show anything which can confirm the stickyness.

how to verify if stickyness is working?

we r planning to use httpwatch, but from within ace using ace what commands can be used to see the stickyness is working.

btw this is for oracle enviornment for ebiz,

thnx

Client will receive two cookies. Cookie replied by server & cookie inserted by ACE.

Set-cookie:oracle.com=xxxxxxxx

&

Set-Cookie: sfarm1-sticky=R3015567854

ACE never replace/delete cookies from Server.With cookie-insert enabled it simply inserts another cookie in the header using the cookie name you configured with sticky-group.

You can verify this by running HTTP protocol analyzer at client.

Syed Iftekhar Ahmed

Thanks

whats the benefit of having multiple cookies?

so if we remove the cookie-insert command, the client will be dependant on the server responded cookie from that server farm configured within the sticky group

we will using httpwatch to troubleshoot the white blank pages issue we are facing, any ideas why the users are receiving the blank page. can there be anything specific within ACE

Only taking out "cookie-insert" from the sticky group will not be sufficient. You need to tell ACE which cookie to look for.

If your App is setting set cookie:oracle=xxx

then your sticky group should be

sticky http-cookie oracle sticky-cookie-insert-8005

replicate sticky

serverfarm sfarm1-apache

Multiple cookies shouldnt pose any problems for ACE. Ace will only look for the cookie name you configured under sticky group even if there are 10 cookies in the header.

Syed Iftekhar Ahmed

Thanks

this means that if server response with set cookie:oracle=xxx and if cookie-insert is enabled then ace will add its cookie set cookie:sfarm1-sticky=yyy+set cookie:oracle=xxx and send it to client.

client will look at the header and read the first part set cookie:sfarm1-sticky=yyy and use it for session stickyness

thnx

Nope.

Client doesnt use cookies for session persistence. It simply stores all the cookies it recieves from a Server response and use it in all the subsequent requests to the same server.

Its the Server that uses the cookie for session persistence. In a similar fashion ACE uses the cookies in HTTP header (in client requests) to hand the session over to the same rserver that issued that cookie.

If you use cookie insert then ACE looks for the cookie it inserted and make decisions on the basis of its inserted cookie.

So there will be multiple cookies in both "response to the client" and "request from the client" and its just a matter of telling ACE about the cookie it should use for persistence.

Syed Iftekhar Ahmed

client--GET request---ACE----Server

server replies with set cookie:oracle.com=R3454647

ace receives it, it doesnt match sfarm1-sticky (cookie name), then what will ACE do?

what cookie name is send back to the client, is it oracle.com or sfarm1-sticky

if it is both then whethere client use oracle.com for one session and sfarm1-sticky for the othere session? how will ACE understand it. if ACE forward the cookie names sent from the server and maintain the database then why will it send its own configured cookie

will ACE maintain a database of cookie name oracle.com=R3544647? if yes how can we see that within ACE, if it doesnt maintain the database then how does it understand where to forward.

apologies for many questions

Case#1 (Ace is not inserting a cookie & looking for cookie "sfarm1-sticky" in server response

sticky http-cookie sfarm1-sticky sticky-cookie-insert-8005

replicate sticky

serverfarm sfarm1-apache

ACE wont see "Set cookie:sfarm1-sticky=xxx" and as a result it wont create a Sticky database entry for the Server.

Cookie set by Server Set Cookie:oracle.com=R3454647

will not used by ACE for persistence.

Case#2 (Ace is inserting a cookie "sfarm1-sticky" in server response )

sticky http-cookie sfarm1-sticky sticky-cookie-insert-8005

replicate sticky

cookie insert

serverfarm sfarm1-apache

ACE will insert cookie "sfarm1-sticky" in the server responses and will look for the same cookie in client requests.

Cookie set by Server Set Cookie:oracle.com=R3454647

will not used by ACE for persistence.

Case#3 (Ace is not inserting a cookie and is looking for oracle.com cookie set by server in server response )

sticky http-cookie oracle.com sticky-cookie-insert-8005

replicate sticky

serverfarm sfarm1-apache

ACE will look for "oracle.com" cookie in the server response and will create an sticky database entry for each rserver.

In all the above cases client will recieve cookie set by server (oracle.com=xxxxxx). All the client requests will use this coookie in their request header but ACE will only use it in case3 example.

HTH

Syed iftekhar Ahmed

The point is, if your server generates its own cookie, there is no need to use cookie-insert.

You need to configure dynamic cookie stickyness.

For that simply configure sticky cookie with your server cookie name (ie: oracle.com) and DO NOT configure cookie insert.

When the server response will go through ACE, it will learn the value and associate it with the server.

Next time the client sends the same cookie name+value, ACE will recognize the entry to match a particular server and we will send the traffic to that server.

The cookie value in your case is very similar to a cookie inserted by ACE.

So I would make sure the cookie is generated by the server and not by ACE itself.

If you are looking on the client side, you have no way to know.

Check on the server side to see what cookies are really generated by the server.

Gilles.

Thanks Guys,

great explanation

we did http debugging and saw cookies sent by ACE and the server. client use both cookies

about the page issue, where user see page not found, the debugging shows there was no response back, client sends the request but there is no response packet. when we refresh the same link, the page gets delievered to the client. what we noticed in http debugger is the header size 2644 when it failed and didnt receive any response but when refresh the same link, the header size is 1940 and we get the response and the page.

is there any known issue with ACE with header size more then 2048

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: