Forum Discussion

PaulHammant_706's avatar
PaulHammant_706
Icon for Nimbostratus rankNimbostratus
Feb 15, 2010

concurrent request affinity (servlet spec section 7.7.2)

The Java servlet spec (all versions AKAIK) section 7.7.2 suggests that in a clustered design, concurrent requests from the same browser session, should be referred back to the same node for processing. Unrelated requests can go to any node. Indeed, consecutive requests from the same browser session can go anywhere too.

 

 

See http://java.sun.com/products/servlet/2.2/servlet-2.2-publicdraft.pdf (or later)

 

 

Of course many will just leave affinity turned on completely to comply, but I am interested in the temporary affinity that 7.7.2 suggests is a minimum requirement for clustered apps.

 

 

Can F5 take iRules that note that a response stream has not been closed yet for session, and a second request is starting, thus it should allocate the same node? And at all other times do no affinity ?

 

 

- Paul

 

 

PS - if you're interested; Google's AppEngine is broken in this respect. There's no official word, but one presumes that either a) don't overlap requests for the same session, or b) be completely stateless are the suggested remedies.

1 Reply

  • Hi Paul,

     

     

    Are you wanting to use an iRule to persist a client based on the session ID over multiple requests (and not by a generic session cookie or the client IP address)? If so, you can use an iRule like this which uses the app's jsessionid cookie or URI token to persist the client to the same LTM pool member:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/Weblogic_JSessionID_Persistence.html

     

     

    Aaron