Class SessionAffinityConfig
Session affinity options.
Inheritance
System.Object
SessionAffinityConfig
Implements
System.IEquatable<SessionAffinityConfig>
Namespace: Yarp.ReverseProxy.Configuration
Assembly: Yarp.ReverseProxy.dll
Syntax
public sealed class SessionAffinityConfig : object
Properties
| Improve this Doc View SourceAffinityKeyName
Identifies the name of the field where the affinity value is stored. For the cookie affinity policy this will be the cookie name. For the header affinity policy this will be the header name. The policy will give its own default if no value is set. This value should be unique across clusters to avoid affinity conflicts. https://github.com/microsoft/reverse-proxy/issues/976 This field is required.
Declaration
public string AffinityKeyName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Cookie
Configuration of a cookie storing the session affinity key in case the Policy is set to 'Cookie'.
Declaration
public SessionAffinityCookieConfig Cookie { get; set; }
Property Value
Type | Description |
---|---|
SessionAffinityCookieConfig |
Enabled
Indicates whether session affinity is enabled.
Declaration
public bool? Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
FailurePolicy
Strategy for handling a missing destination for an affinitized request.
Declaration
public string? FailurePolicy { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
Policy
The session affinity policy to use.
Declaration
public string? Policy { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.String> |
Methods
| Improve this Doc View SourceEquals(SessionAffinityConfig)
Declaration
public bool Equals(SessionAffinityConfig other)
Parameters
Type | Name | Description |
---|---|---|
SessionAffinityConfig | other |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.IEquatable<>