pub struct BackendServiceConnectionTrackingPolicy {
pub connection_persistence_on_unhealthy_backends: Option<String>,
pub enable_strong_affinity: Option<bool>,
pub idle_timeout_sec: Option<i32>,
pub tracking_mode: Option<String>,
}
Expand description
Connection Tracking configuration for this BackendService.
Fields§
§connection_persistence_on_unhealthy_backends: Option<String>
Specifies connection persistence when backends are unhealthy. The default value is DEFAULT_FOR_PROTOCOL. If set to DEFAULT_FOR_PROTOCOL, the existing connections persist on unhealthy backends only for connection-oriented protocols (TCP and SCTP) and only if the Tracking Mode is PER_CONNECTION (default tracking mode) or the Session Affinity is configured for 5-tuple. They do not persist for UDP. If set to NEVER_PERSIST, after a backend becomes unhealthy, the existing connections on the unhealthy backend are never persisted on the unhealthy backend. They are always diverted to newly selected healthy backends (unless all backends are unhealthy). If set to ALWAYS_PERSIST, existing connections always persist on unhealthy backends regardless of protocol and session affinity. It is generally not recommended to use this mode overriding the default. For more details, see Connection Persistence for Network Load Balancing and Connection Persistence for Internal TCP/UDP Load Balancing. Check the ConnectionPersistenceOnUnhealthyBackends enum for the list of possible values.
enable_strong_affinity: Option<bool>
Enable Strong Session Affinity for external passthrough Network Load Balancers. This option is not available publicly.
idle_timeout_sec: Option<i32>
Specifies how long to keep a Connection Tracking entry while there is no matching traffic (in seconds). For internal passthrough Network Load Balancers: - The minimum (default) is 10 minutes and the maximum is 16 hours. - It can be set only if Connection Tracking is less than 5-tuple (i.e. Session Affinity is CLIENT_IP_NO_DESTINATION, CLIENT_IP or CLIENT_IP_PROTO, and Tracking Mode is PER_SESSION). For external passthrough Network Load Balancers the default is 60 seconds. This option is not available publicly.
tracking_mode: Option<String>
Specifies the key used for connection tracking. There are two options: - PER_CONNECTION: This is the default mode. The Connection Tracking is performed as per the Connection Key (default Hash Method) for the specific protocol. - PER_SESSION: The Connection Tracking is performed as per the configured Session Affinity. It matches the configured Session Affinity. For more details, see Tracking Mode for Network Load Balancing and Tracking Mode for Internal TCP/UDP Load Balancing. Check the TrackingMode enum for the list of possible values.
Implementations§
source§impl BackendServiceConnectionTrackingPolicy
impl BackendServiceConnectionTrackingPolicy
sourcepub fn enable_strong_affinity(&self) -> bool
pub fn enable_strong_affinity(&self) -> bool
Returns the value of enable_strong_affinity
, or the default value if enable_strong_affinity
is unset.
sourcepub fn idle_timeout_sec(&self) -> i32
pub fn idle_timeout_sec(&self) -> i32
Returns the value of idle_timeout_sec
, or the default value if idle_timeout_sec
is unset.
sourcepub fn tracking_mode(&self) -> &str
pub fn tracking_mode(&self) -> &str
Returns the value of tracking_mode
, or the default value if tracking_mode
is unset.
sourcepub fn connection_persistence_on_unhealthy_backends(&self) -> &str
pub fn connection_persistence_on_unhealthy_backends(&self) -> &str
Returns the value of connection_persistence_on_unhealthy_backends
, or the default value if connection_persistence_on_unhealthy_backends
is unset.
Trait Implementations§
source§impl Clone for BackendServiceConnectionTrackingPolicy
impl Clone for BackendServiceConnectionTrackingPolicy
source§fn clone(&self) -> BackendServiceConnectionTrackingPolicy
fn clone(&self) -> BackendServiceConnectionTrackingPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Message for BackendServiceConnectionTrackingPolicy
impl Message for BackendServiceConnectionTrackingPolicy
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BackendServiceConnectionTrackingPolicy
impl PartialEq for BackendServiceConnectionTrackingPolicy
source§fn eq(&self, other: &BackendServiceConnectionTrackingPolicy) -> bool
fn eq(&self, other: &BackendServiceConnectionTrackingPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BackendServiceConnectionTrackingPolicy
Auto Trait Implementations§
impl Freeze for BackendServiceConnectionTrackingPolicy
impl RefUnwindSafe for BackendServiceConnectionTrackingPolicy
impl Send for BackendServiceConnectionTrackingPolicy
impl Sync for BackendServiceConnectionTrackingPolicy
impl Unpin for BackendServiceConnectionTrackingPolicy
impl UnwindSafe for BackendServiceConnectionTrackingPolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request