Transaction Tracking Token Middleware Routing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
High availability architectures face challenges in ensuring transaction affinity, where requests belonging to the same transaction are processed by the same middleware instance, especially in distributed systems with multiple tiers, leading to potential inconsistencies and inefficiencies.
Innovation Solution
Implementing transaction tracking tokens that include a unique transaction correlator and middleware instance information, generated by application servers and populated by gateways, to ensure that requests are routed to the same middleware instance, maintaining end-to-end transaction affinity and specific functionality requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If requests are distributed across multiple middleware instances in a high availability architecture, then system availability and load balancing are improved, but transaction affinity is lost causing inconsistencies and inefficiencies
Solution Approach 1:
A gateway component is introduced as an intermediary between the load balancer and middleware instances. The gateway intercepts requests, extracts transaction tracking tokens from the request context, and routes requests to the appropriate middleware instance based on the token. This mediator ensures transaction affinity is maintained while allowing the load balancer to distribute traffic across multiple middleware instances for high availability.
Solution Approach 2:
Transaction tracking tokens are generated and attached to requests before they reach the gateway. The application server creates the token when a transaction begins and includes it in the request context. This preliminary action ensures the transaction identifier is available early in the request flow, enabling the gateway to make informed routing decisions to maintain affinity.
2Manufacturing precision
If transaction tracking tokens are implemented across all tiers, then end-to-end transaction affinity is maintained, but system complexity increases
Solution Approach 1:
The transaction tracking functionality is segmented into distinct components: the application server generates the transaction tracking token, the gateway extracts and routes based on the token, and the middleware instances process requests with affinity. This segmentation allows each component to have a specific, simplified responsibility while collectively achieving end-to-end transaction affinity without requiring complex changes across the entire system.
Solution Approach 2:
The gateway acts as a mediator that handles the complexity of transaction affinity routing, shielding the application servers and middleware instances from complex routing logic. The gateway's transaction tracking module extracts tokens from requests and determines appropriate middleware instance routing, centralizing the complexity in one component rather than distributing it across all system tiers.
Data Source
AI summary
Techniques for transaction tracking for a high availability architecture are described herein. An aspect includes receiving a first request from a client, the first request corresponding to a start of a transaction having transaction affinity. Another aspect includes, based on receiving the first request from the client, generating a transaction tracking token. Another aspect includes sending the first request with the transaction tracking token to a gateway. Another aspect includes receiving a first response corresponding to the first request from the gateway, the first response including middleware instance information corresponding to a middleware instance, wherein a plurality of subsequent requests from the client corresponding to the transaction are processed by the middleware instance corresponding to the middleware instance information.


