client_side_weighted_round_robinv3

package
v1.36.11-2026041321000... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: unknown License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ClientSideWeightedRoundRobin

type ClientSideWeightedRoundRobin struct {

	// Whether to enable out-of-band utilization reporting collection from
	// the endpoints. By default, per-request utilization reporting is used.
	EnableOobLoadReport *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enable_oob_load_report,json=enableOobLoadReport,proto3" json:"enable_oob_load_report,omitempty"`
	// Load reporting interval to request from the server. Note that the
	// server may not provide reports as frequently as the client requests.
	// Used only when enable_oob_load_report is true. Default is 10 seconds.
	OobReportingPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=oob_reporting_period,json=oobReportingPeriod,proto3" json:"oob_reporting_period,omitempty"`
	// A given endpoint must report load metrics continuously for at least
	// this long before the endpoint weight will be used. This avoids
	// churn when the set of endpoint addresses changes. Takes effect
	// both immediately after we establish a connection to an endpoint and
	// after weight_expiration_period has caused us to stop using the most
	// recent load metrics. Default is 10 seconds.
	BlackoutPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=blackout_period,json=blackoutPeriod,proto3" json:"blackout_period,omitempty"`
	// If a given endpoint has not reported load metrics in this long,
	// then we stop using the reported weight. This ensures that we do
	// not continue to use very stale weights. Once we stop using a stale
	// value, if we later start seeing fresh reports again, the
	// blackout_period applies. Defaults to 3 minutes.
	WeightExpirationPeriod *durationpb.Duration `` /* 129-byte string literal not displayed */
	// How often endpoint weights are recalculated. Values less than 100ms are
	// capped at 100ms. Default is 1 second.
	WeightUpdatePeriod *durationpb.Duration `protobuf:"bytes,5,opt,name=weight_update_period,json=weightUpdatePeriod,proto3" json:"weight_update_period,omitempty"`
	// The multiplier used to adjust endpoint weights with the error rate
	// calculated as eps/qps. Configuration is rejected if this value is negative.
	// Default is 1.0.
	ErrorUtilizationPenalty *wrapperspb.FloatValue `` /* 132-byte string literal not displayed */
	// By default, endpoint weight is computed based on the :ref:`application_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.application_utilization>` field reported by the endpoint.
	// If that field is not set, then utilization will instead be computed by taking the max of the values of the metrics specified here.
	// For map fields in the ORCA proto, the string will be of the form “<map_field_name>.<map_key>“. For example, the string “named_metrics.foo“ will mean to look for the key “foo“ in the ORCA :ref:`named_metrics <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.named_metrics>` field.
	// If none of the specified metrics are present in the load report, then :ref:`cpu_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.cpu_utilization>` is used instead.
	MetricNamesForComputingUtilization []string `` /* 169-byte string literal not displayed */
	// Configuration for slow start mode.
	// If this configuration is not set, slow start will not be not enabled.
	SlowStartConfig *v3.SlowStartConfig `protobuf:"bytes,8,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"`
	// contains filtered or unexported fields
}

Configuration for the client_side_weighted_round_robin LB policy.

This policy differs from the built-in ROUND_ROBIN policy in terms of how the endpoint weights are determined. In the ROUND_ROBIN policy, the endpoint weights are sent by the control plane via EDS. However, in this policy, the endpoint weights are instead determined via qps (queries per second), eps (errors per second), and utilization metrics sent by the endpoint using the Open Request Cost Aggregation (ORCA) protocol. Utilization is determined by using the ORCA application_utilization field, if set, or else falling back to the cpu_utilization field. All queries count toward qps, regardless of result. Only failed queries count toward eps. A config parameter error_utilization_penalty controls the penalty to adjust endpoint weights using eps and qps. The weight of a given endpoint is computed as: “qps / (utilization + eps/qps * error_utilization_penalty)“.

Note that Envoy will forward the ORCA response headers/trailers from the upstream cluster to the downstream client. This means that if the downstream client is also configured to use “client_side_weighted_round_robin“ it will load balance against Envoy based on upstream weights. This can happen when Envoy is used as a reverse proxy. To avoid this issue you can configure the :ref:`header_mutation filter <envoy_v3_api_msg_extensions.filters.http.header_mutation.v3.HeaderMutation>` to remove the ORCA payload from the response headers/trailers.

See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.

[#next-free-field: 9]

func (*ClientSideWeightedRoundRobin) ClearBlackoutPeriod

func (x *ClientSideWeightedRoundRobin) ClearBlackoutPeriod()

func (*ClientSideWeightedRoundRobin) ClearEnableOobLoadReport

func (x *ClientSideWeightedRoundRobin) ClearEnableOobLoadReport()

func (*ClientSideWeightedRoundRobin) ClearErrorUtilizationPenalty

func (x *ClientSideWeightedRoundRobin) ClearErrorUtilizationPenalty()

func (*ClientSideWeightedRoundRobin) ClearOobReportingPeriod

func (x *ClientSideWeightedRoundRobin) ClearOobReportingPeriod()

func (*ClientSideWeightedRoundRobin) ClearSlowStartConfig

func (x *ClientSideWeightedRoundRobin) ClearSlowStartConfig()

func (*ClientSideWeightedRoundRobin) ClearWeightExpirationPeriod

func (x *ClientSideWeightedRoundRobin) ClearWeightExpirationPeriod()

func (*ClientSideWeightedRoundRobin) ClearWeightUpdatePeriod

func (x *ClientSideWeightedRoundRobin) ClearWeightUpdatePeriod()

func (*ClientSideWeightedRoundRobin) GetBlackoutPeriod

func (x *ClientSideWeightedRoundRobin) GetBlackoutPeriod() *durationpb.Duration

func (*ClientSideWeightedRoundRobin) GetEnableOobLoadReport

func (x *ClientSideWeightedRoundRobin) GetEnableOobLoadReport() *wrapperspb.BoolValue

func (*ClientSideWeightedRoundRobin) GetErrorUtilizationPenalty

func (x *ClientSideWeightedRoundRobin) GetErrorUtilizationPenalty() *wrapperspb.FloatValue

func (*ClientSideWeightedRoundRobin) GetMetricNamesForComputingUtilization

func (x *ClientSideWeightedRoundRobin) GetMetricNamesForComputingUtilization() []string

func (*ClientSideWeightedRoundRobin) GetOobReportingPeriod

func (x *ClientSideWeightedRoundRobin) GetOobReportingPeriod() *durationpb.Duration

func (*ClientSideWeightedRoundRobin) GetSlowStartConfig

func (x *ClientSideWeightedRoundRobin) GetSlowStartConfig() *v3.SlowStartConfig

func (*ClientSideWeightedRoundRobin) GetWeightExpirationPeriod

func (x *ClientSideWeightedRoundRobin) GetWeightExpirationPeriod() *durationpb.Duration

func (*ClientSideWeightedRoundRobin) GetWeightUpdatePeriod

func (x *ClientSideWeightedRoundRobin) GetWeightUpdatePeriod() *durationpb.Duration

func (*ClientSideWeightedRoundRobin) HasBlackoutPeriod

func (x *ClientSideWeightedRoundRobin) HasBlackoutPeriod() bool

func (*ClientSideWeightedRoundRobin) HasEnableOobLoadReport

func (x *ClientSideWeightedRoundRobin) HasEnableOobLoadReport() bool

func (*ClientSideWeightedRoundRobin) HasErrorUtilizationPenalty

func (x *ClientSideWeightedRoundRobin) HasErrorUtilizationPenalty() bool

func (*ClientSideWeightedRoundRobin) HasOobReportingPeriod

func (x *ClientSideWeightedRoundRobin) HasOobReportingPeriod() bool

func (*ClientSideWeightedRoundRobin) HasSlowStartConfig

func (x *ClientSideWeightedRoundRobin) HasSlowStartConfig() bool

func (*ClientSideWeightedRoundRobin) HasWeightExpirationPeriod

func (x *ClientSideWeightedRoundRobin) HasWeightExpirationPeriod() bool

func (*ClientSideWeightedRoundRobin) HasWeightUpdatePeriod

func (x *ClientSideWeightedRoundRobin) HasWeightUpdatePeriod() bool

func (*ClientSideWeightedRoundRobin) ProtoMessage

func (*ClientSideWeightedRoundRobin) ProtoMessage()

func (*ClientSideWeightedRoundRobin) ProtoReflect

func (*ClientSideWeightedRoundRobin) Reset

func (x *ClientSideWeightedRoundRobin) Reset()

func (*ClientSideWeightedRoundRobin) SetBlackoutPeriod

func (x *ClientSideWeightedRoundRobin) SetBlackoutPeriod(v *durationpb.Duration)

func (*ClientSideWeightedRoundRobin) SetEnableOobLoadReport

func (x *ClientSideWeightedRoundRobin) SetEnableOobLoadReport(v *wrapperspb.BoolValue)

func (*ClientSideWeightedRoundRobin) SetErrorUtilizationPenalty

func (x *ClientSideWeightedRoundRobin) SetErrorUtilizationPenalty(v *wrapperspb.FloatValue)

func (*ClientSideWeightedRoundRobin) SetMetricNamesForComputingUtilization

func (x *ClientSideWeightedRoundRobin) SetMetricNamesForComputingUtilization(v []string)

func (*ClientSideWeightedRoundRobin) SetOobReportingPeriod

func (x *ClientSideWeightedRoundRobin) SetOobReportingPeriod(v *durationpb.Duration)

func (*ClientSideWeightedRoundRobin) SetSlowStartConfig

func (x *ClientSideWeightedRoundRobin) SetSlowStartConfig(v *v3.SlowStartConfig)

func (*ClientSideWeightedRoundRobin) SetWeightExpirationPeriod

func (x *ClientSideWeightedRoundRobin) SetWeightExpirationPeriod(v *durationpb.Duration)

func (*ClientSideWeightedRoundRobin) SetWeightUpdatePeriod

func (x *ClientSideWeightedRoundRobin) SetWeightUpdatePeriod(v *durationpb.Duration)

func (*ClientSideWeightedRoundRobin) String

type ClientSideWeightedRoundRobin_builder

type ClientSideWeightedRoundRobin_builder struct {

	// Whether to enable out-of-band utilization reporting collection from
	// the endpoints. By default, per-request utilization reporting is used.
	EnableOobLoadReport *wrapperspb.BoolValue
	// Load reporting interval to request from the server. Note that the
	// server may not provide reports as frequently as the client requests.
	// Used only when enable_oob_load_report is true. Default is 10 seconds.
	OobReportingPeriod *durationpb.Duration
	// A given endpoint must report load metrics continuously for at least
	// this long before the endpoint weight will be used. This avoids
	// churn when the set of endpoint addresses changes. Takes effect
	// both immediately after we establish a connection to an endpoint and
	// after weight_expiration_period has caused us to stop using the most
	// recent load metrics. Default is 10 seconds.
	BlackoutPeriod *durationpb.Duration
	// If a given endpoint has not reported load metrics in this long,
	// then we stop using the reported weight. This ensures that we do
	// not continue to use very stale weights. Once we stop using a stale
	// value, if we later start seeing fresh reports again, the
	// blackout_period applies. Defaults to 3 minutes.
	WeightExpirationPeriod *durationpb.Duration
	// How often endpoint weights are recalculated. Values less than 100ms are
	// capped at 100ms. Default is 1 second.
	WeightUpdatePeriod *durationpb.Duration
	// The multiplier used to adjust endpoint weights with the error rate
	// calculated as eps/qps. Configuration is rejected if this value is negative.
	// Default is 1.0.
	ErrorUtilizationPenalty *wrapperspb.FloatValue
	// By default, endpoint weight is computed based on the :ref:`application_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.application_utilization>` field reported by the endpoint.
	// If that field is not set, then utilization will instead be computed by taking the max of the values of the metrics specified here.
	// For map fields in the ORCA proto, the string will be of the form “<map_field_name>.<map_key>“. For example, the string “named_metrics.foo“ will mean to look for the key “foo“ in the ORCA :ref:`named_metrics <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.named_metrics>` field.
	// If none of the specified metrics are present in the load report, then :ref:`cpu_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.cpu_utilization>` is used instead.
	MetricNamesForComputingUtilization []string
	// Configuration for slow start mode.
	// If this configuration is not set, slow start will not be not enabled.
	SlowStartConfig *v3.SlowStartConfig
	// contains filtered or unexported fields
}

func (ClientSideWeightedRoundRobin_builder) Build

Source Files

  • client_side_weighted_round_robin.pb.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL