Next-hop Proxy Stickiness
A next-hop proxy can also be selected according to what is known as the "sticky" mode. In this mode, requests of a particular kind, for example, requests coming in from the same client of Web Gateway are directed to the same next-hop proxy.
The part of a request that qualifies it for being handled in sticky mode is configured as the value of a property on Web Gateway. An event in a rule sets the property to this value.
The name of the property that is configured to enable next-hop proxy stickiness is NextHopProxy.StickinessAttribute.
If you want, for example, to let requests from the same client be directed to the same next-hop proxy, you can use the IP address of a client as the value for this property.
In addition to creating a rule, you must also select stickiness as an option within the settings for handling next-hop proxies. The settings also include an option for limiting the time that the next-hop proxy stickiness mode is applied.
Rule for configuring next-hop proxy stickiness
The following sample rule sets the NextHopProxy.StickinessAttribute property to the value of the Client.IP property to let requests with the same client IP address be directed to the same next-hop proxy.
Name Set next-hop proxy stickiness attribute Criteria Action Event Always –> Continue Set NextHopProxy.StickinessAttribute = IP.ToString(Client.IP)
The rule uses an event to set the NextHopProxy.StickinessAttribute property. As this property is of the string type, the value for the Client.IP property must be converted into a string before it can be used for setting the NextHopProxy.StickinessAttribute property.