Tuxedo 11gR1 Client Server Affinity

One of the major new features in Oracle Tuxedo 11gR1 is the ability to define an affinity between clients and servers. In previous releases of Tuxedo, the only way to ensure that multiple requests from a client went to the same server was to establish a conversation with tpconnect() and then use tpsend() and tprecv(). Although this works it has some drawbacks. First for single-threaded servers, the server is tied up for the entire duration of the conversation and cannot service other clients, an obvious scalability issue. I believe the more significant drawback is that the application programmer has to switch from the simple request/response model provided by tpcall() to the half duplex tpsend() and tprecv() calls used with conversations. Switching between the two typically requires a fair amount of redesign and recoding.

The Client Server Affinity feature in Tuxedo 11gR1 allows by way of configuration an application to define affinities that can exist between clients and servers. This is done in the *SERVICES section of the UBBCONFIG file. Using new parameters for services defined in the *SERVICES section, customers can determine when an affinity session is created or deleted, the scope of the affinity, and whether requests can be routed outside the affinity scope.

The AFFINITYSCOPE parameter can be MACHINE, GROUP, or SERVER, meaning that while the affinity session is in place, all requests from the client will be routed to the same MACHINE, GROUP, or SERVER. The creation and deletion of affinity is defined by the SESSIONROLE parameter and a service can be defined as either BEGIN, END, or NONE, where BEGIN starts an affinity session, END deletes the affinity session, and NONE does not impact the affinity session.

Finally customers can define how strictly they want the affinity scope adhered to using the AFFINITYSTRICT parameter. If set to MANDATORY, all requests made during an affinity session will be routed to a server in the affinity scope. Thus if the affinity scope is SERVER, all subsequent tpcall() requests will be sent to the same server the affinity scope was established with. If the server doesn't offer that service, even though other servers do offer the service, the call will fail with TPNOENT. Setting AFFINITYSTRICT to PRECEDENT tells Tuxedo to try and route the request to a server in the affinity scope, but if that's not possible, then Tuxedo can try to route the request to servers out of scope.

All of this begs the question, why? Why have this feature? There many uses for this capability, but the most common is when there is state that is maintained in a server, group of servers, or in a machine and subsequent requests from a client must be routed to where that state is maintained. This might be something as simple as a database cursor maintained by a server on behalf of a client. Alternatively it might be that the server has a connection to an external system and subsequent requests need to go back to the server that has that connection. A more sophisticated case is where a group of servers maintains some sort of cache in shared memory and subsequent requests need to be routed to where the cache is maintained. Although this last case might be able to be handled by data dependent routing, using client server affinity allows the cache to be partitioned dynamically instead of statically.


hi! Does tuxedo client 8.1 work with the newest Tuxedo 11 server version? or I need to use client 11 only? and the same question about Tuxedo 10? Is client 8.1 compatible with Tuxedo 10 version? Thank in advance, Sergey

Posted by Sergey on September 15, 2010 at 03:26 AM CDT #

Hi Sergey, Yes, older Tuxedo clients can work with newer Tuxedo versions, assuming they are remote clients. Native clients need to be rebuilt as they directly access the Tuxedo bulletin board, but remote clients from Tuxedo 6.5 forward are supported against all supported versions of Tuxedo.

Posted by todd.little on September 15, 2010 at 03:55 AM CDT #

Thank you for your answer. One more question there - did you mean "jolt" and "java" clients under "remote"?

Posted by Sergey on September 16, 2010 at 01:18 AM CDT #

Hi Sergey, Yes, Jolt as well as /WS clients can interoperate with newer versions of Tuxedo. Regards, Todd Little Oracle Tuxedo Chief Architect

Posted by todd.little on September 16, 2010 at 03:08 AM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed

This is the Tuxedo product team blog.


« June 2016