Sticky Resource Affinity

When a target operation group type is configured as Sticky Resource Affinity, the Core Engine distributes the client requests between the target operations in the target operations group based on the information such as the sticky key. When the Core Engine routes a client request to a target operation group of the Sticky Resource Affinity type, the target operation is selected based on the value of a sticky key.

  • If the sticky key to the target operation map already exists, the client request is routed to the same target operation.
  • If the sticky key to the target operation map does not exist, a new map is created using the sticky key and the next available target operation in the target operations group. The Core Engine balances the load of the target operations in the target operation group when it selects the available target operation from the group.

Define a sticky key to route the facade operation request to a specific target operation. See Defining and Configuring Sticky Key for details.

For the SG1 target operation group with Sticky Resource Affinity type, consider the following configuration:

  • Sticky Routing Key SK1 is mapped to target operation A. Target operation A has processed 10 requests.
  • Sticky Routing Key SK2 is mapped to target operation B. Target operation B has processed 7 requests.
  • Sticky Routing Key SK3 is mapped to target operation C. Target operation C has processed 4 requests.

For this scenario, the Core Engine processes the client requests as follows:

  • Any incoming client request with SK1 sticky routing key is forwarded to target operation A.
  • Any incoming client request with SK2 sticky routing key is forwarded to target operation B.
  • Any incoming client request with SK3 sticky routing key is forwarded to target operation C.
  • A client request with SK4 sticky routing key is forwarded to target operation C. For this client request, the Core Engine does not associate the SK4 sticky routing key with the request, but chooses target operation A as next target operation in the RoundRobin way. As target operation A has processed 10 requests, the Core Engine forwards this request to target operation C to balance the load between A, B, and C target operations. Any further client requests with SK4 sticky routing key is forwarded to target operation C for processing.
    StickyResourceAffinity Routing Algorithm

Defining and Configuring Sticky Key

To use the Sticky Resource Affinity routing algorithm, define a sticky routing key. The sticky routing key is derived in a XSLT transformation file as part of the parsing step in the request processing pipeline of a facade operation. You can upload the XSLT file for a facade operation configuration in the Config UI. The Core Engine retrieves the sticky key from the transformation. See StickyResourceAffinity Target Operation Group Configuration.