Session affinity with the ODR feature

Session affinity overrides the load-balancing algorithm by directing all requests in a session to a specific application server. For some applications to work correctly, the application requires session affinity between the client and the application server.

Session affinity enhances application performance by using in-memory caching, not a database. Session affinity uses cookies to track session information and to maintain login credentials.

With session affinity, the application server that handles the first client request generates session information and places it in a Set-Cookie header in the response. The client inserts this information in a Cookie header in all future requests in this session with this application server.

Session affinity populates these cookies with a session ID that contains the following information.
  • An identifier for the recovery of session data.
  • Routing information to ensure that all requests in this session are always routed to the same application server.

By default, session affinity is enabled for ODR traffic. The ODR feature provides passive session affinity. Other types of session affinity are not applicable to the ODR feature environment.

In passive session affinity, the application server inserts the Set-Cookie header in the HTTP response. The DataPower® Gateway reads and acts on this cookie for all subsequent requests in this session from this client. The DataPower Gateway does not add or update this cookie.