Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » Relay Server » Introduction to the Relay Server

 

Affinity

Some clients and back-end servers require that certain sequences of multiple HTTP requests go to the same back-end server or even to the same TCP socket connected to that back-end server. In Relay Server terminology, "affinity" is the association between a client and a back-end server across multiple HTTP requests. If a client does NOT require multiple requests to go to the same back-end server, then affinity is not required and you don't need to know anything more about it.

The Relay Server adds affinity information to HTTP responses, and respects affinity information sent up in HTTP requests. The affinity information is sent via HTTP cookies and/or headers. Clients wanting to issue multiple requests to the same back-end server via the Relay Server must send back the affinity information received in each HTTP response by injecting it into the next HTTP request. Back-end servers do not need to do anything to participate in Relay Server affinity. When non-persistent HTTP is used for a sequence of multiple requests for the same back-end, each request creates a new TCP socket connection. When there are multiple back-end servers in a farm, the client must maintain affinity information between the requests. The affinity information tells the Relay Server that the requests are related and are targeting the same back-end server.

When persistent HTTP is used, each request must be on the same TCP socket. Persistent HTTP is a more popular approach because of the performance advantage it provides by reducing the overhead due to socket (and possibly TLS) connections. When persistent HTTP is used, the client must still maintain affinity information between requests because the Relay Server still requires it to maintain the persistence between the Outbound Enabler and the back-end server.

Client-side problems with managing affinity can cause failed requests and other strange behavior. If you suspect an affinity issue with your client application, contact your client application vendor. If the Relay Server administrator is familiar with the client application and has a thorough understanding of the chosen mechanism for maintaining affinity across all involved clients of the back-end farm, the administrator may selectively turn off unused affinity injection using the active_cookie or active_header properties in the back-end farm section of the Relay Server configuration file. Explicitly turning off the renew_overlapped_cookie property is NOT recommended. Doing so may lead to connectivity issues when the client is using standard HTTP cookie reflection to maintain affinity information without isolation between concurrent sessions.

 See also