Message Intermediary Routing for Stateful Service Affinity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Load balancers face challenges in efficiently routing messages to stateful services across multiple service instances, particularly in maintaining performance and affinitization, especially when service instances share a common state store or can be moved between machines.

Innovation Solution

A message forwarding intermediary is introduced that performs peek-lock operations on message pools, allowing it to identify and dispatch messages to the appropriate service instance based on stateful-session affinitization, enabling transactional processing and maintaining message affinity, thereby improving performance and scalability.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If messages are distributed to different backend machines for load balancing, then resource utilization is improved, but message affinity and service performance deteriorate

Engineering Contradiction:
Improveresource utilizationVSAvoidmessage affinity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The load balancer acts as an intermediary that receives messages from the message pool, determines the appropriate backend machine using affinitization algorithms, and forwards messages to the selected service instance. This intermediary approach enables intelligent routing that maintains message affinity while distributing load across multiple backend machines, resolving the contradiction between resource utilization and message affinity.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If service instances share a common state store, then system flexibility and scalability are improved, but maintaining message affinity becomes more difficult

Engineering Contradiction:
Improvesystem flexibilityVSAvoidmessage affinity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The load balancer implements feedback mechanisms by tracking message affinity information and using it to make routing decisions. When service instances share a common state store, the load balancer receives feedback about which backend machine previously processed related messages and uses this information to maintain message affinity, thereby resolving the contradiction between system flexibility and message affinity maintenance.

Inventive Principle:
Principle #23Feedback

3Reliability

If the load balancer continuously monitors service instance states for affinitization, then message affinity is maintained, but system complexity and computational overhead increase

Engineering Contradiction:
Improvemessage affinityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The load balancer performs preliminary actions by pre-establishing affinitization rules and maintaining a cache of affinity information before messages arrive. This preliminary preparation enables the load balancer to make rapid routing decisions without continuous complex monitoring, thereby maintaining message affinity while reducing system complexity and computational overhead during message processing.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8683030B2Routing of pooled messages via an intermediary
Publication Date: 2014.03.25 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8683030B2 patent drawing
  • US8683030B2 patent drawing
  • US8683030B2 patent drawing

AI summary

Message intermediation for multiple service instances, while allowing the service instance to control whether messages are processed under a transaction. The message intermediator chooses to dispatch messages among different backend service instances based on any routing rules. The message intermediator performs a peek-lock of message from a forward-end queue, and assigns the message to a service instance. The message is provided into a backward-end queue specific to the assigned service instance. The service instance may then process the message, perhaps under a transaction created at the service instance. Upon completion of processing, the message is deleted in the back-end queue, which causes the forward-end queue to delete the message under the same transaction created by the service instance. Whether or not this deletion at the forward-end is committed or rolled back depends on whether the transaction created at the service instance is committed or rolled back.