Table of Contents

Class SessionAffinityConfig

Namespace
Yarp.ReverseProxy.Configuration
Assembly
Yarp.ReverseProxy.dll

Session affinity options.

public sealed record SessionAffinityConfig : IEquatable<SessionAffinityConfig>
Inheritance
SessionAffinityConfig
Implements
Inherited Members

Constructors

SessionAffinityConfig()

public SessionAffinityConfig()

Properties

AffinityKeyName

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.

public string AffinityKeyName { get; init; }

Property Value

string

Configuration of a cookie storing the session affinity key in case the Policy is set to 'Cookie'.

public SessionAffinityCookieConfig? Cookie { get; init; }

Property Value

SessionAffinityCookieConfig

Enabled

Indicates whether session affinity is enabled.

public bool? Enabled { get; init; }

Property Value

bool?

FailurePolicy

Strategy handling missing destination for an affinitized request.

public string? FailurePolicy { get; init; }

Property Value

string

Policy

The session affinity policy to use.

public string? Policy { get; init; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(SessionAffinityConfig?)

public bool Equals(SessionAffinityConfig? other)

Parameters

other SessionAffinityConfig

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

<Clone>$()

public SessionAffinityConfig <Clone>$()

Returns

SessionAffinityConfig

Operators

operator ==(SessionAffinityConfig?, SessionAffinityConfig?)

public static bool operator ==(SessionAffinityConfig? left, SessionAffinityConfig? right)

Parameters

left SessionAffinityConfig
right SessionAffinityConfig

Returns

bool

operator !=(SessionAffinityConfig?, SessionAffinityConfig?)

public static bool operator !=(SessionAffinityConfig? left, SessionAffinityConfig? right)

Parameters

left SessionAffinityConfig
right SessionAffinityConfig

Returns

bool