cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
810
Views
0
Helpful
6
Replies

CSS Sticky Configuration (with Cookies)

manuelvl76
Level 1
Level 1

Hello all,

I'm trying to configure cookie sticky using "advanced-balance" option in a CSS 11503.

Under certain circumstances, sticky is not achieved (I assume the offset or the cookie lenght might change).

How can I debug how the CSS is seeing the cookie and taking the part I have specified (with lenght, prefix and so on)?

Thanks for your kind assistance.

Best regards,

Manuel A. Velazquez

6 Replies 6

Gilles Dufour
Cisco Employee
Cisco Employee

There is not much debugging in the CSS.

You will have to capture a sniffer trace and verify your assumption.

Also be aware that if inside a persistent connection a new cookie is sent [this would happen with proxies] and the CSS needs to remap the flow to a new server, this is only possible if you have configured 'no persistent' and if the the flow has not been marked idle.

A flow that has been marked idle can't be remapped.

You may want to increase idle timeout and see if that reduces the number of occurences of your problem.

Gilles.

Gilles,

Thanks for your answer. What about the "llama" mode and the stickyDebug command?

I've tried to find some documentation but was unable.

Have you any information about its usage?

Thanks again and best regards,

Manuel

Gilles Dufour
Cisco Employee
Cisco Employee

honestly I didn't know what this command was doing.

So I went into to the code and starter digging.

All this command does is change the sticky hash function from ipsource to ipsource + tcp source and destination ports.

This is not a *debug* command but more an engineering command to force a particular behavior.

As I mentioned previously, there is NO WAY for you to see what the CSS does with the cookie.

The best solution is to try the suggestion I provided.

Get a sniff or change the idle timeout.

Also, personally I do not think the problem is the cookie - why would the server use different format ?

Gilles.

ebeekman
Level 1
Level 1

Hi Manuel,

I haven't seen seen this on the CSS, debugging is very limited on the box.

Regards,

Edwin

I am having this exact problem as well. I have done a snoop on the web servers and can see the Cookie. It is not changing.

The Cookie is set using PHP and I set the PHPSESSID with a unique string on each server using the php.ini file. EG for first web server: PHPSESSIDweb01.

This shows up in the HTTP header as Cookie: PHPSESSIDweb01=

In the browser PHPSESSIDweb01 is the cookie name and the 32byte string is the content.

I assume the CSS just sees the whole HTTP header on the way through and Cuts the string at the configured prefix, in this case PHPSESSID, then giving no length to skip, I match the next 5 characters (EG web0x, where x is 1 or 2 or 3 depending on which web server it is). the respective string web0x is entered for each service.

This is hard to reproduce, but it does happen, it just takes time and currently I can not reliably use the CSS as a load balancer for the website until this is resolved. (Thankfully the load is yet to go up).

Again, as I said earlier, this problem is linked to the fact that you are using persistent connection and that if there is a delay of 8sec or more between 2 consecutive requests, the CSS will mark the connection as idle [even if there is still traffic going through].

The connection will then eventually be garrbage collected and at this point, the connection can't be remapped to another server even if the cookie references a different server.

The solution is to increase the idle timeout using the command 'flow-timeout-multiplier' if you have a CSS11500 or 'flow port timeout' if you have a CSS11000.

Gilles.

Review Cisco Networking for a $25 gift card