cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1871
Views
4
Helpful
3
Replies

http cookie stickiness

dinoantonucci
Level 1
Level 1

Hi,

I have an http session between Web Server farm and Application Server Farm.

After firt http request, Application Server send this pck (see file http_header.txt ).

So, I configured http cookie Stickiness with Dynamic cookie learning:

sticky http-cookie JSESSIONID Cookie-Bea-Group

cookie offset 0 length 64

timeout 70

timeout activeconns

replicate sticky

serverfarm BEA8-SFARM-3

But it doesn't work. But if web server received an answer from Application server with only one set-cookie

Set-Cookie:JSESSIONID=xxxxx

It work

if in the http header there are two set-cookie doesn't work.

I need stick the session based only on JSESSIONID cookie.

Is it possible and how?

Thanks

Dino

3 Replies 3

dario.didio
Level 4
Level 4

Hi colleague ;-)

Normally this should work.

Do you need the offset lenght?

Is there a possibility to insert an ACE cookie, independent from the cookie the application inserts, that can be used to perform stickyness?

Do you see anything in the sticky database?

Kr,

Dario

Hi Dario,

I solved the problem with Cookie insert solution.

Thanks

Dino

Hi Dear,

The ACE appliance/module has the dynamic cookie feature.

You then just need configure the cookie name and the box does the rest.

When static cookies are used there will only be one entry in the cookie database per real server. So, if ace-cookie is the only cookie defined and there are two servers, there will only be two entries in the sticky database, even if there are thousands of user sessions.

Dynamic cookie learning is another option for keeping the SAP session persistent. The sticky table can hold a maximum of four million dynamic entries (four million simultaneous users). The key is choosing the right cookie name.

Lets take an example of SAP sets a number of cookies for various purposes (note the ace_cookie was set by Cisco ACE using cookie insert, not SAP), but the saplb_* cookie is set by SAP specifically for load-balancers. It has the format saplb_=()[].

Here, the cookie value also helps to verify which server instance and physical node you are connected to.

The configuration process for cookie learning is similar-with a few changes in the syntax.

Example configuration:

ssticky http-cookie saplb_* ep-cookie

replicate sticky

serverfarm EP-HTTP

policy-map type loadbalance http first-match ep-policy

class class-default

sticky-serverfarm ep-cookie

In the above examples, the replicate sticky command is used so that the cookie information is replicated to the standby Cisco ACE context. With this implementation, session persistence is maintained in the event of a failover. The default timeout is one day.

--

The show sticky data command retrieves the active sticky entries that have been dynamically learned. The value shown is not the actual cookie value, but a function of it created by Cisco ACE.

Example configuration:

switch/SAP-Datacenter# show sticky data

sticky group : ep-cookie

type : HTTP-COOKIE

timeout : 100 timeout-activeconns : FALSE

sticky-entry rserver-instance time-to-expire flags

---------------------+--------------------------------+--------------+-------+

6026630525409626373 SAP-EP:50000 5983

Load Balancing Identifier

The Load Balancing Identifier used for Load balancing to Web AS Java instances has the following syntax.

saplb_=()[]

The cookie is set on path=”/” and domain=.

The same syntax applies if the identifier is used via url rewriting.

The applies only to the J2EE Engine where session stickyness on a process (JVM) level is required. The uniquely identifies a set of instances. If there are no special group definitions then the special group identifier '*' is used. This will be the case for a default installation.

The SAP Web Dispatcher checks for path prefix match and thereby determines group name. This allows to obtain from the set of dispatch cookies or to do initial load balancing for the group. The Java dispatcher receives the request and also checks for the group. The Java dispatcher then reads from the appropriate dispatch cookie or performs initial dispatch on his local nodes.

The CSS does not have the possibility to learn dynamic cookie value created on the server.

So, you can either use arrowpoint cookies which is quite simple or have your server team add a static value to the jsessionid in order to identify the server.

We can then configure the CSS to locate this static value and match it to a service.

If possible kindly rate.

Keep in touch.

Kind regards,

Sachin Garg

Review Cisco Networking for a $25 gift card