pub struct Backend {Show 13 fields
pub balancing_mode: Option<String>,
pub capacity_scaler: Option<f32>,
pub description: Option<String>,
pub failover: Option<bool>,
pub group: Option<String>,
pub max_connections: Option<i32>,
pub max_connections_per_endpoint: Option<i32>,
pub max_connections_per_instance: Option<i32>,
pub max_rate: Option<i32>,
pub max_rate_per_endpoint: Option<f32>,
pub max_rate_per_instance: Option<f32>,
pub max_utilization: Option<f32>,
pub preference: Option<String>,
}
Expand description
Message containing information of one individual backend.
Fields§
§balancing_mode: Option<String>
Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode. Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups. Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact and is ignored. Specifically, Backend.maxUtilization is ignored when Backend.balancingMode is RATE. In the future, this incompatible combination will be rejected. Check the BalancingMode enum for the list of possible values.
capacity_scaler: Option<f32>
A multiplier applied to the backend’s target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don’t support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs.
description: Option<String>
An optional description of this resource. Provide this property when you create the resource.
failover: Option<bool>
This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
group: Option<String>
The fully-qualified URL of an instance group or network endpoint group (NEG) resource. To determine what types of backends a load balancer supports, see the Backend services overview. You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
max_connections: Option<i32>
Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend’s balancingMode is RATE.
max_connections_per_endpoint: Option<i32>
Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend’s balancingMode is RATE.
max_connections_per_instance: Option<i32>
Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend’s balancingMode is RATE.
max_rate: Option<i32>
Defines a maximum number of HTTP requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend’s balancingMode is CONNECTION.
max_rate_per_endpoint: Option<f32>
Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend’s balancingMode is CONNECTION.
max_rate_per_instance: Option<f32>
Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend’s balancingMode is CONNECTION.
max_utilization: Option<f32>
Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.
preference: Option<String>
This field indicates whether this backend should be fully utilized before sending traffic to backends with default preference. The possible values are: - PREFERRED: Backends with this preference level will be filled up to their capacity limits first, based on RTT. - DEFAULT: If preferred backends don’t have enough capacity, backends in this layer would be used and traffic would be assigned based on the load balancing algorithm you use. This is the default Check the Preference enum for the list of possible values.
Implementations§
source§impl Backend
impl Backend
sourcepub fn max_rate_per_instance(&self) -> f32
pub fn max_rate_per_instance(&self) -> f32
Returns the value of max_rate_per_instance
, or the default value if max_rate_per_instance
is unset.
sourcepub fn group(&self) -> &str
pub fn group(&self) -> &str
Returns the value of group
, or the default value if group
is unset.
sourcepub fn max_connections_per_instance(&self) -> i32
pub fn max_connections_per_instance(&self) -> i32
Returns the value of max_connections_per_instance
, or the default value if max_connections_per_instance
is unset.
sourcepub fn max_connections(&self) -> i32
pub fn max_connections(&self) -> i32
Returns the value of max_connections
, or the default value if max_connections
is unset.
sourcepub fn max_rate_per_endpoint(&self) -> f32
pub fn max_rate_per_endpoint(&self) -> f32
Returns the value of max_rate_per_endpoint
, or the default value if max_rate_per_endpoint
is unset.
sourcepub fn failover(&self) -> bool
pub fn failover(&self) -> bool
Returns the value of failover
, or the default value if failover
is unset.
sourcepub fn max_utilization(&self) -> f32
pub fn max_utilization(&self) -> f32
Returns the value of max_utilization
, or the default value if max_utilization
is unset.
sourcepub fn preference(&self) -> &str
pub fn preference(&self) -> &str
Returns the value of preference
, or the default value if preference
is unset.
sourcepub fn max_connections_per_endpoint(&self) -> i32
pub fn max_connections_per_endpoint(&self) -> i32
Returns the value of max_connections_per_endpoint
, or the default value if max_connections_per_endpoint
is unset.
sourcepub fn capacity_scaler(&self) -> f32
pub fn capacity_scaler(&self) -> f32
Returns the value of capacity_scaler
, or the default value if capacity_scaler
is unset.
sourcepub fn max_rate(&self) -> i32
pub fn max_rate(&self) -> i32
Returns the value of max_rate
, or the default value if max_rate
is unset.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description
, or the default value if description
is unset.
sourcepub fn balancing_mode(&self) -> &str
pub fn balancing_mode(&self) -> &str
Returns the value of balancing_mode
, or the default value if balancing_mode
is unset.
Trait Implementations§
source§impl Message for Backend
impl Message for Backend
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 Backend
impl PartialEq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnwindSafe for Backend
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