Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

CSS - Sticky via HTTP Header

Hello,

There is an application with an app-Proxy between the Application Server and the Client.

Client -> Proxy -> App Server

So i have two proxy Servers, which intercept the client requests and then forward them to the Application Servers.

There are 4 Application Servers, and Stickyness is needed, that the Client Session always terminate on the same Application Server.

I can not use Source-IP because i have only 2 Proxy Servers.

The Application Proxy, does add a Header in the HTTP Request to the Application Server, which contains the client ip Address, which startet the request to the Proxy.

Is it possible to do a Stickyness via a Hader named client_ip which contains the original Client IP Adresses?

I do not know the Client-IP Address, because it is an Internet Application.

I think, if the client_ip is a cookie i can do this via changing the string operation hash-crc32.

But i never tried this.

Sven

7 REPLIES
Cisco Employee

Re: CSS - Sticky via HTTP Header

Sven,

I don't think you can stick on data that are in the header. You can if the data are in the url or in a cookie. I don't think this is the case here.

Could you use arrowpoint-cookies ??

This would work.

Gilles.

New Member

Re: CSS - Sticky via HTTP Header

Hi Gilles,

i think best is, the Server will put a Cookie.

Using arrowpint-cookies i never did, and i think this will cost some more performance vs the server.

The new ACE Module can stick via Header strings i've seen.

Sven

Cisco Employee

Re: CSS - Sticky via HTTP Header

Yes the ACE module can stick on header data.

This is a new hardwrae with a new software.

Gilles.

New Member

Re: CSS - Sticky via HTTP Header

Hi,

anyone have a configuration example of stikyness for http header data?

I searched but Im unable to find one...

Thank you.

Best regards,

Norberto

Cisco Employee

Re: CSS - Sticky via HTTP Header

Hi Norberto,

This is a basic configuration for stickiness based on HTTP headers.

sticky http-header Accept-Charset head-sticky
timeout 10
serverfarm Standard


class-map type http loadbalance match-any L7-URL
2 match http url .*.htm


policy-map type loadbalance first-match L7-match
class L7-URL
sticky-serverfarm head-sticky
class class-default
serverfarm default

A common header field when dealing with proxy'd connections is the X-Forwarded-For:

sticky http-header X-Forwarded-For Src-IP
timeout 10
serverfarm Backend

HTH

__ __

Pablo

New Member

Re: CSS - Sticky via HTTP Header

Hi,

Thank you Pablo.

This feature of do stickyness by the http header data it's only available in ACEs or also its supported in CSM?

Best regards,

Norberto

Cisco Employee

Re: CSS - Sticky via HTTP Header

Hi Norberto,

Sure the CSM is also able to stick clients based on HTTP header, here is a config snippet:


MSFC-A(config)# module csm 2
MSFC-A(config-module-csm)# sticky 7 header X-Forwarded-For timeout 20
MSFC-A(config-slb-sticky-header)# header offset 5 length 50
vserver Web
virtual 192.168.78.35 tcp 80
serverfarm Backend
sticky 20 group 7
persistent rebalance
inservice

HTH =)
__ __
Pablo

465
Views
4
Helpful
7
Replies
CreatePlease to create content