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

HTTP header insertion on ACE timeout

hrtn
Level 1
Level 1

Hi,

We're testing with http header insertion on our ACE-modules to log the client's ip-address.

I have made a webpage which displays the added header.

The insertion seems to work okay, but the header is only inserted in the first request within a one-minute period.

When I refresh the page within a minute, the header is not added.

When I wait a minute or longer before refreshing, the header is added.

When I open the page within a minute on a different machine, the header is added so it's obviously related to the user's session.

I can imagine this is done to reduce the ACE's workload, but is there some way to change this behaviour?

1 Accepted Solution

Accepted Solutions

Gilles Dufour
Cisco Employee
Cisco Employee

switch/User1(config)# parameter-map type http Rebalance
switch/User1(config-parammap-http)# header ?
  modify  Modify header
switch/User1(config-parammap-http)# header modify ?
  per-request  This is applicable for every request/response
switch/User1(config-parammap-http)# header modify per-request

That's the paramter-map that you need to insert the header in every request.

The reason for the 1 minute is that your browser or your server keeps the connection open for that long.

If a new request (refresh) comes in during that period of time, we can reuse the existing connection.

ACE without the parameter-map does not add a new header.

After the 1 minute timeout (on the server or client - not ace) the connection is closed and when you do a refresh a new connection is open.

Since this is a new connection, ACE will insert the header.

The solution is the parameter-map above.

Gilles.

View solution in original post

5 Replies 5

ciscocsoc
Level 4
Level 4

Hi,

To change this behaviour you need to either enable "TCP server reuse" or "persistence-rebalance". This is documented in the ACE Server Loadbalancing manual under "Configuring HTTP Header Insertion". Admittedly this is a little subtle as the manual only mentions later (for example under TCP Server Reuse that "... Another effect of TCP server reuse is that header insertion and cookie insertion, if enabled, occur for every request instead of only the first request." - and similarly under persistence-rebalance.

HTH

Cathy

Okay, but where does the timeout of 1 minute in itself come from?

It could be that a user's session is balanced to another server, resulting in a new session and thus a new insertion, but we configured our serverfarms to use sticky sessions with a timeout of 15 minutes so that shouldn't be happening.

The fact that the insertion only works on the first request isn't our biggest problem, what bothers us more is that we're receiving complaints that customers on our websites lose their session after a minute of inactivity, resulting in an empty shopping basket, being logged out, etc.

I think you need to post your config. The short timeout might occur if you are using SSL SessionID as the stickiness factor. Also a packet capture of a client session would be helpful.

Cathy

Hi Cathy,

Here's the config of one ACE module.

Thanks for your help.

Gilles Dufour
Cisco Employee
Cisco Employee

switch/User1(config)# parameter-map type http Rebalance
switch/User1(config-parammap-http)# header ?
  modify  Modify header
switch/User1(config-parammap-http)# header modify ?
  per-request  This is applicable for every request/response
switch/User1(config-parammap-http)# header modify per-request

That's the paramter-map that you need to insert the header in every request.

The reason for the 1 minute is that your browser or your server keeps the connection open for that long.

If a new request (refresh) comes in during that period of time, we can reuse the existing connection.

ACE without the parameter-map does not add a new header.

After the 1 minute timeout (on the server or client - not ace) the connection is closed and when you do a refresh a new connection is open.

Since this is a new connection, ACE will insert the header.

The solution is the parameter-map above.

Gilles.

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: