envoy_types/generated/envoy.config.cluster.v3.rs
1// This file is @generated by prost-build.
2/// :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
3/// specified individually for each defined priority.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct CircuitBreakers {
6 ///
7 /// If multiple :ref:`Thresholds<envoy_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
8 /// are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
9 /// the first one in the list is used. If no Thresholds is defined for a given
10 /// : ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`, the default values
11 /// are used.
12 #[prost(message, repeated, tag = "1")]
13 pub thresholds: ::prost::alloc::vec::Vec<circuit_breakers::Thresholds>,
14 /// Optional per-host limits which apply to each individual host in a cluster.
15 ///
16 /// .. note::
17 /// currently only the :ref:`max_connections <envoy_v3_api_field_config.cluster.v3.CircuitBreakers.Thresholds.max_connections>` field is supported for per-host limits.
18 ///
19 ///
20 /// If multiple per-host :ref:`Thresholds<envoy_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
21 /// are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
22 /// the first one in the list is used. If no per-host Thresholds are defined for a given
23 /// : ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
24 /// the cluster will not have per-host limits.
25 #[prost(message, repeated, tag = "2")]
26 pub per_host_thresholds: ::prost::alloc::vec::Vec<circuit_breakers::Thresholds>,
27}
28/// Nested message and enum types in `CircuitBreakers`.
29pub mod circuit_breakers {
30 ///
31 /// A Thresholds defines CircuitBreaker settings for a
32 /// : ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`.
33 /// \[\#next-free-field: 9\]
34 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
35 pub struct Thresholds {
36 /// The :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`
37 /// the specified CircuitBreaker settings apply to.
38 #[prost(
39 enumeration = "super::super::super::core::v3::RoutingPriority",
40 tag = "1"
41 )]
42 pub priority: i32,
43 /// The maximum number of connections that Envoy will make to the upstream
44 /// cluster. If not specified, the default is 1024.
45 #[prost(message, optional, tag = "2")]
46 pub max_connections: ::core::option::Option<
47 super::super::super::super::super::google::protobuf::UInt32Value,
48 >,
49 /// The maximum number of pending requests that Envoy will allow to the
50 /// upstream cluster. If not specified, the default is 1024.
51 /// This limit is applied as a connection limit for non-HTTP traffic.
52 #[prost(message, optional, tag = "3")]
53 pub max_pending_requests: ::core::option::Option<
54 super::super::super::super::super::google::protobuf::UInt32Value,
55 >,
56 /// The maximum number of parallel requests that Envoy will make to the
57 /// upstream cluster. If not specified, the default is 1024.
58 /// This limit does not apply to non-HTTP traffic.
59 #[prost(message, optional, tag = "4")]
60 pub max_requests: ::core::option::Option<
61 super::super::super::super::super::google::protobuf::UInt32Value,
62 >,
63 /// The maximum number of parallel retries that Envoy will allow to the
64 /// upstream cluster. If not specified, the default is 3.
65 #[prost(message, optional, tag = "5")]
66 pub max_retries: ::core::option::Option<
67 super::super::super::super::super::google::protobuf::UInt32Value,
68 >,
69 /// Specifies a limit on concurrent retries in relation to the number of active requests. This
70 /// parameter is optional.
71 ///
72 /// .. note::
73 ///
74 /// ```text
75 /// If this field is set, the retry budget will override any configured retry circuit
76 /// breaker.
77 /// ```
78 #[prost(message, optional, tag = "8")]
79 pub retry_budget: ::core::option::Option<thresholds::RetryBudget>,
80 /// If track_remaining is true, then stats will be published that expose
81 /// the number of resources remaining until the circuit breakers open. If
82 /// not specified, the default is false.
83 ///
84 /// .. note::
85 ///
86 /// ```text
87 /// If a retry budget is used in lieu of the max_retries circuit breaker,
88 /// the remaining retry resources remaining will not be tracked.
89 /// ```
90 #[prost(bool, tag = "6")]
91 pub track_remaining: bool,
92 ///
93 /// The maximum number of connection pools per cluster that Envoy will concurrently support at
94 /// once. If not specified, the default is unlimited. Set this for clusters which create a
95 /// large number of connection pools. See
96 /// : ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
97 /// more details.
98 #[prost(message, optional, tag = "7")]
99 pub max_connection_pools: ::core::option::Option<
100 super::super::super::super::super::google::protobuf::UInt32Value,
101 >,
102 }
103 /// Nested message and enum types in `Thresholds`.
104 pub mod thresholds {
105 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
106 pub struct RetryBudget {
107 /// Specifies the limit on concurrent retries as a percentage of the sum of active requests and
108 /// active pending requests. For example, if there are 100 active requests and the
109 /// budget_percent is set to 25, there may be 25 active retries.
110 ///
111 /// This parameter is optional. Defaults to 20%.
112 #[prost(message, optional, tag = "1")]
113 pub budget_percent: ::core::option::Option<
114 super::super::super::super::super::r#type::v3::Percent,
115 >,
116 /// Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
117 /// number of active retries may never go below this number.
118 ///
119 /// This parameter is optional. Defaults to 3.
120 #[prost(message, optional, tag = "2")]
121 pub min_retry_concurrency: ::core::option::Option<
122 super::super::super::super::super::super::google::protobuf::UInt32Value,
123 >,
124 }
125 }
126}
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct Filter {
129 /// The name of the filter configuration.
130 #[prost(string, tag = "1")]
131 pub name: ::prost::alloc::string::String,
132 /// Filter specific configuration which depends on the filter being
133 /// instantiated. See the supported filters for further documentation.
134 /// Note that Envoy's :ref:`downstream network filters <config_network_filters>` are not valid upstream network filters.
135 /// Only one of typed_config or config_discovery can be used.
136 #[prost(message, optional, tag = "2")]
137 pub typed_config: ::core::option::Option<
138 super::super::super::super::google::protobuf::Any,
139 >,
140 /// Configuration source specifier for an extension configuration discovery
141 /// service. In case of a failure and without the default configuration, the
142 /// listener closes the connections.
143 /// Only one of typed_config or config_discovery can be used.
144 #[prost(message, optional, tag = "3")]
145 pub config_discovery: ::core::option::Option<
146 super::super::core::v3::ExtensionConfigSource,
147 >,
148}
149/// See the :ref:`architecture overview <arch_overview_outlier_detection>` for
150/// more information on outlier detection.
151/// \[\#next-free-field: 26\]
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct OutlierDetection {
154 /// The number of consecutive server-side error responses (for HTTP traffic,
155 /// 5xx responses; for TCP traffic, connection failures; for Redis, failure to
156 /// respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5.
157 #[prost(message, optional, tag = "1")]
158 pub consecutive_5xx: ::core::option::Option<
159 super::super::super::super::google::protobuf::UInt32Value,
160 >,
161 /// The time interval between ejection analysis sweeps. This can result in
162 /// both new ejections as well as hosts being returned to service. Defaults
163 /// to 10000ms or 10s.
164 #[prost(message, optional, tag = "2")]
165 pub interval: ::core::option::Option<
166 super::super::super::super::google::protobuf::Duration,
167 >,
168 /// The base time that a host is ejected for. The real time is equal to the
169 /// base time multiplied by the number of times the host has been ejected and is
170 /// capped by :ref:`max_ejection_time<envoy_v3_api_field_config.cluster.v3.OutlierDetection.max_ejection_time>`.
171 /// Defaults to 30000ms or 30s.
172 #[prost(message, optional, tag = "3")]
173 pub base_ejection_time: ::core::option::Option<
174 super::super::super::super::google::protobuf::Duration,
175 >,
176 /// The maximum % of an upstream cluster that can be ejected due to outlier detection. Defaults to 10% .
177 /// Will eject at least one host regardless of the value if :ref:`always_eject_one_host<envoy_v3_api_field_config.cluster.v3.OutlierDetection.always_eject_one_host>` is enabled.
178 #[prost(message, optional, tag = "4")]
179 pub max_ejection_percent: ::core::option::Option<
180 super::super::super::super::google::protobuf::UInt32Value,
181 >,
182 /// The % chance that a host will be actually ejected when an outlier status
183 /// is detected through consecutive 5xx. This setting can be used to disable
184 /// ejection or to ramp it up slowly. Defaults to 100.
185 #[prost(message, optional, tag = "5")]
186 pub enforcing_consecutive_5xx: ::core::option::Option<
187 super::super::super::super::google::protobuf::UInt32Value,
188 >,
189 /// The % chance that a host will be actually ejected when an outlier status
190 /// is detected through success rate statistics. This setting can be used to
191 /// disable ejection or to ramp it up slowly. Defaults to 100.
192 #[prost(message, optional, tag = "6")]
193 pub enforcing_success_rate: ::core::option::Option<
194 super::super::super::super::google::protobuf::UInt32Value,
195 >,
196 /// The number of hosts in a cluster that must have enough request volume to
197 /// detect success rate outliers. If the number of hosts is less than this
198 /// setting, outlier detection via success rate statistics is not performed
199 /// for any host in the cluster. Defaults to 5.
200 #[prost(message, optional, tag = "7")]
201 pub success_rate_minimum_hosts: ::core::option::Option<
202 super::super::super::super::google::protobuf::UInt32Value,
203 >,
204 /// The minimum number of total requests that must be collected in one
205 /// interval (as defined by the interval duration above) to include this host
206 /// in success rate based outlier detection. If the volume is lower than this
207 /// setting, outlier detection via success rate statistics is not performed
208 /// for that host. Defaults to 100.
209 #[prost(message, optional, tag = "8")]
210 pub success_rate_request_volume: ::core::option::Option<
211 super::super::super::super::google::protobuf::UInt32Value,
212 >,
213 /// This factor is used to determine the ejection threshold for success rate
214 /// outlier ejection. The ejection threshold is the difference between the
215 /// mean success rate, and the product of this factor and the standard
216 /// deviation of the mean success rate: mean - (stdev *
217 /// success_rate_stdev_factor). This factor is divided by a thousand to get a
218 /// double. That is, if the desired factor is 1.9, the runtime value should
219 /// be 1900. Defaults to 1900.
220 #[prost(message, optional, tag = "9")]
221 pub success_rate_stdev_factor: ::core::option::Option<
222 super::super::super::super::google::protobuf::UInt32Value,
223 >,
224 /// The number of consecutive gateway failures (502, 503, 504 status codes)
225 /// before a consecutive gateway failure ejection occurs. Defaults to 5.
226 #[prost(message, optional, tag = "10")]
227 pub consecutive_gateway_failure: ::core::option::Option<
228 super::super::super::super::google::protobuf::UInt32Value,
229 >,
230 /// The % chance that a host will be actually ejected when an outlier status
231 /// is detected through consecutive gateway failures. This setting can be
232 /// used to disable ejection or to ramp it up slowly. Defaults to 0.
233 #[prost(message, optional, tag = "11")]
234 pub enforcing_consecutive_gateway_failure: ::core::option::Option<
235 super::super::super::super::google::protobuf::UInt32Value,
236 >,
237 ///
238 /// Determines whether to distinguish local origin failures from external errors. If set to true
239 /// the following configuration parameters are taken into account:
240 /// : ref:`consecutive_local_origin_failure<envoy_v3_api_field_config.cluster.v3.OutlierDetection.consecutive_local_origin_failure>`,
241 /// : ref:`enforcing_consecutive_local_origin_failure<envoy_v3_api_field_config.cluster.v3.OutlierDetection.enforcing_consecutive_local_origin_failure>`
242 /// and
243 /// : ref:`enforcing_local_origin_success_rate<envoy_v3_api_field_config.cluster.v3.OutlierDetection.enforcing_local_origin_success_rate>`.
244 /// Defaults to false.
245 #[prost(bool, tag = "12")]
246 pub split_external_local_origin_errors: bool,
247 ///
248 /// The number of consecutive locally originated failures before ejection
249 /// occurs. Defaults to 5. Parameter takes effect only when
250 /// : ref:`split_external_local_origin_errors<envoy_v3_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
251 /// is set to true.
252 #[prost(message, optional, tag = "13")]
253 pub consecutive_local_origin_failure: ::core::option::Option<
254 super::super::super::super::google::protobuf::UInt32Value,
255 >,
256 ///
257 /// The % chance that a host will be actually ejected when an outlier status
258 /// is detected through consecutive locally originated failures. This setting can be
259 /// used to disable ejection or to ramp it up slowly. Defaults to 100.
260 /// Parameter takes effect only when
261 /// : ref:`split_external_local_origin_errors<envoy_v3_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
262 /// is set to true.
263 #[prost(message, optional, tag = "14")]
264 pub enforcing_consecutive_local_origin_failure: ::core::option::Option<
265 super::super::super::super::google::protobuf::UInt32Value,
266 >,
267 ///
268 /// The % chance that a host will be actually ejected when an outlier status
269 /// is detected through success rate statistics for locally originated errors.
270 /// This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
271 /// Parameter takes effect only when
272 /// : ref:`split_external_local_origin_errors<envoy_v3_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
273 /// is set to true.
274 #[prost(message, optional, tag = "15")]
275 pub enforcing_local_origin_success_rate: ::core::option::Option<
276 super::super::super::super::google::protobuf::UInt32Value,
277 >,
278 /// The failure percentage to use when determining failure percentage-based outlier detection. If
279 /// the failure percentage of a given host is greater than or equal to this value, it will be
280 /// ejected. Defaults to 85.
281 #[prost(message, optional, tag = "16")]
282 pub failure_percentage_threshold: ::core::option::Option<
283 super::super::super::super::google::protobuf::UInt32Value,
284 >,
285 /// The % chance that a host will be actually ejected when an outlier status is detected through
286 /// failure percentage statistics. This setting can be used to disable ejection or to ramp it up
287 /// slowly. Defaults to 0.
288 ///
289 /// \[\#next-major-version: setting this without setting failure_percentage_threshold should be
290 /// invalid in v4.\]
291 #[prost(message, optional, tag = "17")]
292 pub enforcing_failure_percentage: ::core::option::Option<
293 super::super::super::super::google::protobuf::UInt32Value,
294 >,
295 /// The % chance that a host will be actually ejected when an outlier status is detected through
296 /// local-origin failure percentage statistics. This setting can be used to disable ejection or to
297 /// ramp it up slowly. Defaults to 0.
298 #[prost(message, optional, tag = "18")]
299 pub enforcing_failure_percentage_local_origin: ::core::option::Option<
300 super::super::super::super::google::protobuf::UInt32Value,
301 >,
302 /// The minimum number of hosts in a cluster in order to perform failure percentage-based ejection.
303 /// If the total number of hosts in the cluster is less than this value, failure percentage-based
304 /// ejection will not be performed. Defaults to 5.
305 #[prost(message, optional, tag = "19")]
306 pub failure_percentage_minimum_hosts: ::core::option::Option<
307 super::super::super::super::google::protobuf::UInt32Value,
308 >,
309 /// The minimum number of total requests that must be collected in one interval (as defined by the
310 /// interval duration above) to perform failure percentage-based ejection for this host. If the
311 /// volume is lower than this setting, failure percentage-based ejection will not be performed for
312 /// this host. Defaults to 50.
313 #[prost(message, optional, tag = "20")]
314 pub failure_percentage_request_volume: ::core::option::Option<
315 super::super::super::super::google::protobuf::UInt32Value,
316 >,
317 ///
318 /// The maximum time that a host is ejected for. See :ref:`base_ejection_time<envoy_v3_api_field_config.cluster.v3.OutlierDetection.base_ejection_time>`
319 /// for more information. If not specified, the default value (300000ms or 300s) or
320 /// : ref:`base_ejection_time<envoy_v3_api_field_config.cluster.v3.OutlierDetection.base_ejection_time>` value is applied, whatever is larger.
321 #[prost(message, optional, tag = "21")]
322 pub max_ejection_time: ::core::option::Option<
323 super::super::super::super::google::protobuf::Duration,
324 >,
325 /// The maximum amount of jitter to add to the ejection time, in order to prevent
326 /// a 'thundering herd' effect where all proxies try to reconnect to host at the same time.
327 /// See :ref:`max_ejection_time_jitter<envoy_v3_api_field_config.cluster.v3.OutlierDetection.base_ejection_time>`
328 /// Defaults to 0s.
329 #[prost(message, optional, tag = "22")]
330 pub max_ejection_time_jitter: ::core::option::Option<
331 super::super::super::super::google::protobuf::Duration,
332 >,
333 /// If active health checking is enabled and a host is ejected by outlier detection, a successful active health check
334 /// unejects the host by default and considers it as healthy. Unejection also clears all the outlier detection counters.
335 /// To change this default behavior set this config to `false` where active health checking will not uneject the host.
336 /// Defaults to true.
337 #[prost(message, optional, tag = "23")]
338 pub successful_active_health_check_uneject_host: ::core::option::Option<
339 super::super::super::super::google::protobuf::BoolValue,
340 >,
341 /// Set of host's passive monitors.
342 /// \[\#not-implemented-hide:\]
343 #[prost(message, repeated, tag = "24")]
344 pub monitors: ::prost::alloc::vec::Vec<super::super::core::v3::TypedExtensionConfig>,
345 /// If enabled, at least one host is ejected regardless of the value of :ref:`max_ejection_percent<envoy_v3_api_field_config.cluster.v3.OutlierDetection.max_ejection_percent>`.
346 /// Defaults to false.
347 #[prost(message, optional, tag = "25")]
348 pub always_eject_one_host: ::core::option::Option<
349 super::super::super::super::google::protobuf::BoolValue,
350 >,
351}
352/// Cluster list collections. Entries are `Cluster` resources or references.
353/// \[\#not-implemented-hide:\]
354#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct ClusterCollection {
356 #[prost(message, optional, tag = "1")]
357 pub entries: ::core::option::Option<
358 super::super::super::super::xds::core::v3::CollectionEntry,
359 >,
360}
361/// Configuration for a single upstream cluster.
362/// \[\#next-free-field: 59\]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct Cluster {
365 ///
366 /// Configuration to use different transport sockets for different endpoints. The entry of
367 /// `envoy.transport_socket_match` in the :ref:`LbEndpoint.Metadata <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>` is used to match against the
368 /// transport sockets as they appear in the list. If a match is not found, the search continues in
369 /// : ref:`LocalityLbEndpoints.Metadata <envoy_v3_api_field_config.endpoint.v3.LocalityLbEndpoints.metadata>`. The first :ref:`match <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch>` is used. For example, with
370 /// the following match
371 ///
372 ///
373 /// .. code-block:: yaml
374 ///
375 /// transport_socket_matches:
376 ///
377 /// * name: "enableMTLS"
378 /// match:
379 /// acceptMTLS: true
380 /// transport_socket:
381 /// name: envoy.transport_sockets.tls
382 /// config: { ... } # tls socket configuration
383 /// * name: "defaultToPlaintext"
384 /// match: {}
385 /// transport_socket:
386 /// name: envoy.transport_sockets.raw_buffer
387 ///
388 /// Connections to the endpoints whose metadata value under `envoy.transport_socket_match`
389 /// having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration.
390 ///
391 /// If a :ref:`socket match <envoy_v3_api_msg_config.cluster.v3.Cluster.TransportSocketMatch>` with empty match
392 /// criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext"
393 /// socket match in case above.
394 ///
395 /// If an endpoint metadata's value under `envoy.transport_socket_match` does not match any
396 /// `TransportSocketMatch`, the locality metadata is then checked for a match. Barring any
397 /// matches in the endpoint or locality metadata, the socket configuration fallbacks to use the
398 /// `tls_context` or `transport_socket` specified in this cluster.
399 ///
400 /// This field allows gradual and flexible transport socket configuration changes.
401 ///
402 /// The metadata of endpoints in EDS can indicate transport socket capabilities. For example,
403 /// an endpoint's metadata can have two key value pairs as "acceptMTLS": "true",
404 /// "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic
405 /// has "acceptPlaintext": "true" metadata information.
406 ///
407 /// Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS
408 /// traffic for endpoints with "acceptMTLS": "true", by adding a corresponding
409 /// `TransportSocketMatch` in this field. Other client Envoys receive CDS without
410 /// `transport_socket_match` set, and still send plain text traffic to the same cluster.
411 ///
412 ///
413 /// This field can be used to specify custom transport socket configurations for health
414 /// checks by adding matching key/value pairs in a health check's
415 /// : ref:`transport socket match criteria <envoy_v3_api_field_config.core.v3.HealthCheck.transport_socket_match_criteria>` field.
416 ///
417 ///
418 /// \[\#comment:TODO(incfly): add a detailed architecture doc on intended usage.\]
419 #[prost(message, repeated, tag = "43")]
420 pub transport_socket_matches: ::prost::alloc::vec::Vec<
421 cluster::TransportSocketMatch,
422 >,
423 ///
424 /// Supplies the name of the cluster which must be unique across all clusters.
425 /// The cluster name is used when emitting
426 /// : ref:`statistics <config_cluster_manager_cluster_stats>` if :ref:`alt_stat_name <envoy_v3_api_field_config.cluster.v3.Cluster.alt_stat_name>` is not provided.
427 /// Any `:` in the cluster name will be converted to `_` when emitting statistics.
428 #[prost(string, tag = "1")]
429 pub name: ::prost::alloc::string::String,
430 ///
431 /// An optional alternative to the cluster name to be used for observability. This name is used
432 /// for emitting stats for the cluster and access logging the cluster name. This will appear as
433 /// additional information in configuration dumps of a cluster's current status as
434 /// : ref:`observability_name <envoy_v3_api_field_admin.v3.ClusterStatus.observability_name>`
435 /// and as an additional tag "upstream_cluster.name" while tracing.
436 ///
437 /// .. note::
438 /// Any `:` in the name will be converted to `_` when emitting statistics. This should not be confused with
439 /// : ref:`Router Filter Header <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
440 #[prost(string, tag = "28")]
441 pub alt_stat_name: ::prost::alloc::string::String,
442 /// Configuration to use for EDS updates for the Cluster.
443 #[prost(message, optional, tag = "3")]
444 pub eds_cluster_config: ::core::option::Option<cluster::EdsClusterConfig>,
445 /// The timeout for new network connections to hosts in the cluster.
446 /// If not set, a default value of 5s will be used.
447 #[prost(message, optional, tag = "4")]
448 pub connect_timeout: ::core::option::Option<
449 super::super::super::super::google::protobuf::Duration,
450 >,
451 /// Soft limit on size of the cluster’s connections read and write buffers. If
452 /// unspecified, an implementation defined default is applied (1MiB).
453 #[prost(message, optional, tag = "5")]
454 pub per_connection_buffer_limit_bytes: ::core::option::Option<
455 super::super::super::super::google::protobuf::UInt32Value,
456 >,
457 /// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
458 /// when picking a host in the cluster.
459 #[prost(enumeration = "cluster::LbPolicy", tag = "6")]
460 pub lb_policy: i32,
461 ///
462 /// Setting this is required for specifying members of
463 /// : ref:`STATIC<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STATIC>`,
464 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
465 /// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>` clusters.
466 /// This field supersedes the `hosts` field in the v2 API.
467 ///
468 ///
469 /// .. attention::
470 ///
471 ///
472 /// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
473 /// : ref:`endpoint assignments<envoy_v3_api_msg_config.endpoint.v3.ClusterLoadAssignment>`.
474 #[prost(message, optional, tag = "33")]
475 pub load_assignment: ::core::option::Option<
476 super::super::endpoint::v3::ClusterLoadAssignment,
477 >,
478 /// Optional :ref:`active health checking <arch_overview_health_checking>`
479 /// configuration for the cluster. If no
480 /// configuration is specified no health checking will be done and all cluster
481 /// members will be considered healthy at all times.
482 #[prost(message, repeated, tag = "8")]
483 pub health_checks: ::prost::alloc::vec::Vec<super::super::core::v3::HealthCheck>,
484 /// Optional maximum requests for a single upstream connection. This parameter
485 /// is respected by both the HTTP/1.1 and HTTP/2 connection pool
486 /// implementations. If not specified, there is no limit. Setting this
487 /// parameter to 1 will effectively disable keep alive.
488 ///
489 /// .. attention::
490 /// This field has been deprecated in favor of the :ref:`max_requests_per_connection <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_requests_per_connection>` field.
491 #[deprecated]
492 #[prost(message, optional, tag = "9")]
493 pub max_requests_per_connection: ::core::option::Option<
494 super::super::super::super::google::protobuf::UInt32Value,
495 >,
496 /// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster.
497 #[prost(message, optional, tag = "10")]
498 pub circuit_breakers: ::core::option::Option<CircuitBreakers>,
499 ///
500 /// HTTP protocol options that are applied only to upstream HTTP connections.
501 /// These options apply to all HTTP versions.
502 /// This has been deprecated in favor of
503 /// : ref:`upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options>`
504 /// in the :ref:`http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions>` message.
505 /// upstream_http_protocol_options can be set via the cluster's
506 /// : ref:`extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`.
507 /// See :ref:`upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options>`
508 /// for example usage.
509 #[deprecated]
510 #[prost(message, optional, tag = "46")]
511 pub upstream_http_protocol_options: ::core::option::Option<
512 super::super::core::v3::UpstreamHttpProtocolOptions,
513 >,
514 ///
515 /// Additional options when handling HTTP requests upstream. These options will be applicable to
516 /// both HTTP1 and HTTP2 requests.
517 /// This has been deprecated in favor of
518 /// : ref:`common_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.common_http_protocol_options>`
519 /// in the :ref:`http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions>` message.
520 /// common_http_protocol_options can be set via the cluster's
521 /// : ref:`extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`.
522 /// See :ref:`upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options>`
523 /// for example usage.
524 #[deprecated]
525 #[prost(message, optional, tag = "29")]
526 pub common_http_protocol_options: ::core::option::Option<
527 super::super::core::v3::HttpProtocolOptions,
528 >,
529 ///
530 /// Additional options when handling HTTP1 requests.
531 /// This has been deprecated in favor of http_protocol_options fields in the
532 /// : ref:`http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions>` message.
533 /// http_protocol_options can be set via the cluster's
534 /// : ref:`extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`.
535 /// See :ref:`upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options>`
536 /// for example usage.
537 #[deprecated]
538 #[prost(message, optional, tag = "13")]
539 pub http_protocol_options: ::core::option::Option<
540 super::super::core::v3::Http1ProtocolOptions,
541 >,
542 ///
543 /// Even if default HTTP2 protocol options are desired, this field must be
544 /// set so that Envoy will assume that the upstream supports HTTP/2 when
545 /// making new HTTP connection pool connections. Currently, Envoy only
546 /// supports prior knowledge for upstream connections. Even if TLS is used
547 /// with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2
548 /// connections to happen over plain text.
549 /// This has been deprecated in favor of http2_protocol_options fields in the
550 /// : ref:`http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions>`
551 /// message. http2_protocol_options can be set via the cluster's
552 /// : ref:`extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`.
553 /// See :ref:`upstream_http_protocol_options <envoy_v3_api_field_extensions.upstreams.http.v3.HttpProtocolOptions.upstream_http_protocol_options>`
554 /// for example usage.
555 #[deprecated]
556 #[prost(message, optional, tag = "14")]
557 pub http2_protocol_options: ::core::option::Option<
558 super::super::core::v3::Http2ProtocolOptions,
559 >,
560 /// The extension_protocol_options field is used to provide extension-specific protocol options
561 /// for upstream connections. The key should match the extension filter name, such as
562 /// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
563 /// specific options.
564 /// \[\#next-major-version: make this a list of typed extensions.\]
565 /// \[\#extension-category: envoy.upstream_options\]
566 #[prost(map = "string, message", tag = "36")]
567 pub typed_extension_protocol_options: ::std::collections::HashMap<
568 ::prost::alloc::string::String,
569 super::super::super::super::google::protobuf::Any,
570 >,
571 ///
572 /// If the DNS refresh rate is specified and the cluster type is either
573 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
574 /// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
575 /// this value is used as the cluster’s DNS refresh
576 /// rate. The value configured must be at least 1ms. If this setting is not specified, the
577 /// value defaults to 5000ms. For cluster types other than
578 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
579 /// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
580 /// this setting is ignored.
581 /// This field is deprecated in favor of using the :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>`
582 /// extension point and configuring it with :ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`.
583 /// If :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` is configured with
584 /// : ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`, this field will be ignored.
585 #[deprecated]
586 #[prost(message, optional, tag = "16")]
587 pub dns_refresh_rate: ::core::option::Option<
588 super::super::super::super::google::protobuf::Duration,
589 >,
590 ///
591 /// DNS jitter can be optionally specified if the cluster type is either
592 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
593 /// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`.
594 /// DNS jitter causes the cluster to refresh DNS entries later by a random amount of time to avoid a
595 /// stampede of DNS requests. This value sets the upper bound (exclusive) for the random amount.
596 /// There will be no jitter if this value is omitted. For cluster types other than
597 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
598 /// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
599 /// this setting is ignored.
600 /// This field is deprecated in favor of using the :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>`
601 /// extension point and configuring it with :ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`.
602 /// If :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` is configured with
603 /// : ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`, this field will be ignored.
604 #[deprecated]
605 #[prost(message, optional, tag = "58")]
606 pub dns_jitter: ::core::option::Option<
607 super::super::super::super::google::protobuf::Duration,
608 >,
609 ///
610 /// If the DNS failure refresh rate is specified and the cluster type is either
611 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
612 /// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
613 /// this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is
614 /// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
615 /// other than :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>` and
616 /// : ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
617 /// ignored.
618 /// This field is deprecated in favor of using the :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>`
619 /// extension point and configuring it with :ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`.
620 /// If :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` is configured with
621 /// : ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`, this field will be ignored.
622 #[deprecated]
623 #[prost(message, optional, tag = "44")]
624 pub dns_failure_refresh_rate: ::core::option::Option<cluster::RefreshRate>,
625 ///
626 /// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
627 /// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
628 /// resolution.
629 /// This field is deprecated in favor of using the :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>`
630 /// extension point and configuring it with :ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`.
631 /// If :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` is configured with
632 /// : ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`, this field will be ignored.
633 #[deprecated]
634 #[prost(bool, tag = "39")]
635 pub respect_dns_ttl: bool,
636 ///
637 /// The DNS IP address resolution policy. If this setting is not specified, the
638 /// value defaults to
639 /// : ref:`AUTO<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DnsLookupFamily.AUTO>`.
640 /// For logical and strict dns cluster, this field is deprecated in favor of using the
641 /// : ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>`
642 /// extension point and configuring it with :ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`.
643 /// If :ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` is configured with
644 /// : ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`, this field will be ignored.
645 #[prost(enumeration = "cluster::DnsLookupFamily", tag = "17")]
646 pub dns_lookup_family: i32,
647 ///
648 /// If DNS resolvers are specified and the cluster type is either
649 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
650 /// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
651 /// this value is used to specify the cluster’s dns resolvers.
652 /// If this setting is not specified, the value defaults to the default
653 /// resolver, which uses /etc/resolv.conf for configuration. For cluster types
654 /// other than
655 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
656 /// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
657 /// this setting is ignored.
658 /// This field is deprecated in favor of `dns_resolution_config`
659 /// which aggregates all of the DNS resolver configuration in a single message.
660 #[deprecated]
661 #[prost(message, repeated, tag = "18")]
662 pub dns_resolvers: ::prost::alloc::vec::Vec<super::super::core::v3::Address>,
663 /// Always use TCP queries instead of UDP queries for DNS lookups.
664 /// This field is deprecated in favor of `dns_resolution_config`
665 /// which aggregates all of the DNS resolver configuration in a single message.
666 #[deprecated]
667 #[prost(bool, tag = "45")]
668 pub use_tcp_for_dns_lookups: bool,
669 ///
670 /// DNS resolution configuration which includes the underlying dns resolver addresses and options.
671 /// This field is deprecated in favor of
672 /// : ref:`typed_dns_resolver_config <envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>`.
673 #[deprecated]
674 #[prost(message, optional, tag = "53")]
675 pub dns_resolution_config: ::core::option::Option<
676 super::super::core::v3::DnsResolutionConfig,
677 >,
678 ///
679 /// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple,
680 /// or any other DNS resolver types and the related parameters.
681 /// For example, an object of
682 /// : ref:`CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>`
683 /// can be packed into this `typed_dns_resolver_config`. This configuration replaces the
684 /// : ref:`dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>`
685 /// configuration.
686 /// During the transition period when both `dns_resolution_config` and `typed_dns_resolver_config` exists,
687 /// when `typed_dns_resolver_config` is in place, Envoy will use it and ignore `dns_resolution_config`.
688 /// When `typed_dns_resolver_config` is missing, the default behavior is in place.
689 /// Also note that this field is deprecated for logical dns and strict dns clusters and will be ignored when
690 /// : ref:`cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` is configured with
691 /// : ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`.
692 /// \[\#extension-category: envoy.network.dns_resolver\]
693 #[prost(message, optional, tag = "55")]
694 pub typed_dns_resolver_config: ::core::option::Option<
695 super::super::core::v3::TypedExtensionConfig,
696 >,
697 ///
698 /// Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for
699 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`,
700 /// or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
701 /// or :ref:`Redis Cluster<arch_overview_redis>`.
702 /// If true, cluster readiness blocks on warm-up. If false, the cluster will complete
703 /// initialization whether or not warm-up has completed. Defaults to true.
704 #[prost(message, optional, tag = "54")]
705 pub wait_for_warm_on_init: ::core::option::Option<
706 super::super::super::super::google::protobuf::BoolValue,
707 >,
708 ///
709 /// If specified, outlier detection will be enabled for this upstream cluster.
710 /// Each of the configuration values can be overridden via
711 /// : ref:`runtime values <config_cluster_manager_cluster_runtime_outlier_detection>`.
712 #[prost(message, optional, tag = "19")]
713 pub outlier_detection: ::core::option::Option<OutlierDetection>,
714 ///
715 /// The interval for removing stale hosts from a cluster type
716 /// : ref:`ORIGINAL_DST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.ORIGINAL_DST>`.
717 /// Hosts are considered stale if they have not been used
718 /// as upstream destinations during this interval. New hosts are added
719 /// to original destination clusters on demand as new connections are
720 /// redirected to Envoy, causing the number of hosts in the cluster to
721 /// grow over time. Hosts that are not stale (they are actively used as
722 /// destinations) are kept in the cluster, which allows connections to
723 /// them remain open, saving the latency that would otherwise be spent
724 /// on opening new connections. If this setting is not specified, the
725 /// value defaults to 5000ms. For cluster types other than
726 /// : ref:`ORIGINAL_DST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.ORIGINAL_DST>`
727 /// this setting is ignored.
728 #[prost(message, optional, tag = "20")]
729 pub cleanup_interval: ::core::option::Option<
730 super::super::super::super::google::protobuf::Duration,
731 >,
732 /// Optional configuration used to bind newly established upstream connections.
733 /// This overrides any bind_config specified in the bootstrap proto.
734 /// If the address and port are empty, no bind will be performed.
735 #[prost(message, optional, tag = "21")]
736 pub upstream_bind_config: ::core::option::Option<super::super::core::v3::BindConfig>,
737 /// Configuration for load balancing subsetting.
738 #[prost(message, optional, tag = "22")]
739 pub lb_subset_config: ::core::option::Option<cluster::LbSubsetConfig>,
740 /// Common configuration for all load balancer implementations.
741 #[prost(message, optional, tag = "27")]
742 pub common_lb_config: ::core::option::Option<cluster::CommonLbConfig>,
743 ///
744 /// Optional custom transport socket implementation to use for upstream connections.
745 /// To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and
746 /// : ref:`UpstreamTlsContexts <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.UpstreamTlsContext>` in the `typed_config`.
747 /// If no transport socket configuration is specified, new connections
748 /// will be set up with plaintext.
749 #[prost(message, optional, tag = "24")]
750 pub transport_socket: ::core::option::Option<
751 super::super::core::v3::TransportSocket,
752 >,
753 /// The Metadata field can be used to provide additional information about the
754 /// cluster. It can be used for stats, logging, and varying filter behavior.
755 /// Fields should use reverse DNS notation to denote which entity within Envoy
756 /// will need the information. For instance, if the metadata is intended for
757 /// the Router filter, the filter name should be specified as `envoy.filters.http.router`.
758 #[prost(message, optional, tag = "25")]
759 pub metadata: ::core::option::Option<super::super::core::v3::Metadata>,
760 ///
761 /// Determines how Envoy selects the protocol used to speak to upstream hosts.
762 /// This has been deprecated in favor of setting explicit protocol selection
763 /// in the :ref:`http_protocol_options <envoy_v3_api_msg_extensions.upstreams.http.v3.HttpProtocolOptions>` message.
764 /// http_protocol_options can be set via the cluster's
765 /// : ref:`extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`.
766 #[deprecated]
767 #[prost(enumeration = "cluster::ClusterProtocolSelection", tag = "26")]
768 pub protocol_selection: i32,
769 /// Optional options for upstream connections.
770 #[prost(message, optional, tag = "30")]
771 pub upstream_connection_options: ::core::option::Option<UpstreamConnectionOptions>,
772 /// If an upstream host becomes unhealthy (as determined by the configured health checks
773 /// or outlier detection), immediately close all connections to the failed host.
774 ///
775 /// .. note::
776 ///
777 /// This is currently only supported for connections created by tcp_proxy.
778 ///
779 /// .. note::
780 ///
781 /// The current implementation of this feature closes all connections immediately when
782 /// the unhealthy status is detected. If there are a large number of connections open
783 /// to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of
784 /// time exclusively closing these connections, and not processing any other traffic.
785 #[prost(bool, tag = "31")]
786 pub close_connections_on_host_health_failure: bool,
787 /// If set to true, Envoy will ignore the health value of a host when processing its removal
788 /// from service discovery. This means that if active health checking is used, Envoy will *not*
789 /// wait for the endpoint to go unhealthy before removing it.
790 #[prost(bool, tag = "32")]
791 pub ignore_health_on_host_removal: bool,
792 /// An (optional) network filter chain, listed in the order the filters should be applied.
793 /// The chain will be applied to all outgoing connections that Envoy makes to the upstream
794 /// servers of this cluster.
795 #[prost(message, repeated, tag = "40")]
796 pub filters: ::prost::alloc::vec::Vec<Filter>,
797 ///
798 /// If this field is set and is supported by the client, it will supersede the value of
799 /// : ref:`lb_policy<envoy_v3_api_field_config.cluster.v3.Cluster.lb_policy>`.
800 #[prost(message, optional, tag = "41")]
801 pub load_balancing_policy: ::core::option::Option<LoadBalancingPolicy>,
802 /// \[\#not-implemented-hide:\]
803 /// If present, tells the client where to send load reports via LRS. If not present, the
804 /// client will fall back to a client-side default, which may be either (a) don't send any
805 /// load reports or (b) send load reports for all clusters to a single default server
806 /// (which may be configured in the bootstrap file).
807 ///
808 /// Note that if multiple clusters point to the same LRS server, the client may choose to
809 /// create a separate stream for each cluster or it may choose to coalesce the data for
810 /// multiple clusters onto a single stream. Either way, the client must make sure to send
811 /// the data for any given cluster on no more than one stream.
812 ///
813 /// \[\#next-major-version: In the v3 API, we should consider restructuring this somehow,
814 /// maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation
815 /// from the LRS stream here.\]
816 #[prost(message, optional, tag = "42")]
817 pub lrs_server: ::core::option::Option<super::super::core::v3::ConfigSource>,
818 /// A list of metric names from :ref:`ORCA load reports <envoy_v3_api_msg_.xds.data.orca.v3.OrcaLoadReport>` to propagate to LRS.
819 ///
820 /// If not specified, then ORCA load reports will not be propagated to LRS.
821 ///
822 ///
823 /// For map fields in the ORCA proto, the string will be of the form `<map_field_name>.<map_key>`.
824 /// For example, the string `named_metrics.foo` will mean to look for the key `foo` in the ORCA
825 /// : ref:`named_metrics <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.named_metrics>` field.
826 ///
827 ///
828 /// The special map key `*` means to report all entries in the map (e.g., `named_metrics.*` means to
829 /// report all entries in the ORCA named_metrics field). Note that this should be used only with trusted
830 /// backends.
831 ///
832 /// The metric names in LRS will follow the same semantics as this field. In other words, if this field
833 /// contains `named_metrics.foo`, then the LRS load report will include the data with that same string
834 /// as the key.
835 #[prost(string, repeated, tag = "57")]
836 pub lrs_report_endpoint_metrics: ::prost::alloc::vec::Vec<
837 ::prost::alloc::string::String,
838 >,
839 /// If track_timeout_budgets is true, the :ref:`timeout budget histograms <config_cluster_manager_cluster_stats_timeout_budgets>` will be published for each
840 /// request. These show what percentage of a request's per try and global timeout was used. A value
841 /// of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value
842 /// of 100 would indicate that the request took the entirety of the timeout given to it.
843 ///
844 /// .. attention::
845 ///
846 ///
847 /// This field has been deprecated in favor of `timeout_budgets`, part of
848 /// : ref:`track_cluster_stats <envoy_v3_api_field_config.cluster.v3.Cluster.track_cluster_stats>`.
849 #[deprecated]
850 #[prost(bool, tag = "47")]
851 pub track_timeout_budgets: bool,
852 /// Optional customization and configuration of upstream connection pool, and upstream type.
853 ///
854 /// Currently this field only applies for HTTP traffic but is designed for eventual use for custom
855 /// TCP upstreams.
856 ///
857 /// For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream
858 /// HTTP, using the http connection pool and the codec from `http2_protocol_options`
859 ///
860 /// For routes where CONNECT termination is configured, Envoy will take downstream CONNECT
861 /// requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool.
862 ///
863 /// The default pool used is the generic connection pool which creates the HTTP upstream for most
864 /// HTTP requests, and the TCP upstream if CONNECT termination is configured.
865 ///
866 /// If users desire custom connection pool or upstream behavior, for example terminating
867 /// CONNECT only if a custom filter indicates it is appropriate, the custom factories
868 /// can be registered and configured here.
869 /// \[\#extension-category: envoy.upstreams\]
870 #[prost(message, optional, tag = "48")]
871 pub upstream_config: ::core::option::Option<
872 super::super::core::v3::TypedExtensionConfig,
873 >,
874 /// Configuration to track optional cluster stats.
875 #[prost(message, optional, tag = "49")]
876 pub track_cluster_stats: ::core::option::Option<TrackClusterStats>,
877 /// Preconnect configuration for this cluster.
878 #[prost(message, optional, tag = "50")]
879 pub preconnect_policy: ::core::option::Option<cluster::PreconnectPolicy>,
880 /// If `connection_pool_per_downstream_connection` is true, the cluster will use a separate
881 /// connection pool for every downstream connection
882 #[prost(bool, tag = "51")]
883 pub connection_pool_per_downstream_connection: bool,
884 #[prost(oneof = "cluster::ClusterDiscoveryType", tags = "2, 38")]
885 pub cluster_discovery_type: ::core::option::Option<cluster::ClusterDiscoveryType>,
886 ///
887 /// Optional configuration for the load balancing algorithm selected by
888 /// LbPolicy. Currently only
889 /// : ref:`RING_HASH<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.RING_HASH>`,
890 /// : ref:`MAGLEV<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.MAGLEV>` and
891 /// : ref:`LEAST_REQUEST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.LEAST_REQUEST>`
892 /// has additional configuration options.
893 /// Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding
894 /// LbPolicy will generate an error at runtime.
895 #[prost(oneof = "cluster::LbConfig", tags = "23, 52, 34, 37, 56")]
896 pub lb_config: ::core::option::Option<cluster::LbConfig>,
897}
898/// Nested message and enum types in `Cluster`.
899pub mod cluster {
900 /// TransportSocketMatch specifies what transport socket config will be used
901 /// when the match conditions are satisfied.
902 #[derive(Clone, PartialEq, ::prost::Message)]
903 pub struct TransportSocketMatch {
904 /// The name of the match, used in stats generation.
905 #[prost(string, tag = "1")]
906 pub name: ::prost::alloc::string::String,
907 /// Optional metadata match criteria.
908 /// The connection to the endpoint with metadata matching what is set in this field
909 /// will use the transport socket configuration specified here.
910 /// The endpoint's metadata entry in `envoy.transport_socket_match` is used to match
911 /// against the values specified in this field.
912 #[prost(message, optional, tag = "2")]
913 pub r#match: ::core::option::Option<
914 super::super::super::super::super::google::protobuf::Struct,
915 >,
916 /// The configuration of the transport socket.
917 /// \[\#extension-category: envoy.transport_sockets.upstream\]
918 #[prost(message, optional, tag = "3")]
919 pub transport_socket: ::core::option::Option<
920 super::super::super::core::v3::TransportSocket,
921 >,
922 }
923 /// Extended cluster type.
924 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
925 pub struct CustomClusterType {
926 /// The type of the cluster to instantiate. The name must match a supported cluster type.
927 #[prost(string, tag = "1")]
928 pub name: ::prost::alloc::string::String,
929 /// Cluster specific configuration which depends on the cluster being instantiated.
930 /// See the supported cluster for further documentation.
931 /// \[\#extension-category: envoy.clusters\]
932 #[prost(message, optional, tag = "2")]
933 pub typed_config: ::core::option::Option<
934 super::super::super::super::super::google::protobuf::Any,
935 >,
936 }
937 /// Only valid when discovery type is EDS.
938 #[derive(Clone, PartialEq, ::prost::Message)]
939 pub struct EdsClusterConfig {
940 /// Configuration for the source of EDS updates for this Cluster.
941 #[prost(message, optional, tag = "1")]
942 pub eds_config: ::core::option::Option<
943 super::super::super::core::v3::ConfigSource,
944 >,
945 /// Optional alternative to cluster name to present to EDS. This does not
946 /// have the same restrictions as cluster name, i.e. it may be arbitrary
947 /// length. This may be a xdstp:// URL.
948 #[prost(string, tag = "2")]
949 pub service_name: ::prost::alloc::string::String,
950 }
951 /// Optionally divide the endpoints in this cluster into subsets defined by
952 /// endpoint metadata and selected by route and weighted cluster metadata.
953 /// \[\#next-free-field: 9\]
954 #[derive(Clone, PartialEq, ::prost::Message)]
955 pub struct LbSubsetConfig {
956 ///
957 /// The behavior used when no endpoint subset matches the selected route's
958 /// metadata. The value defaults to
959 /// : ref:`NO_FALLBACK<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
960 #[prost(enumeration = "lb_subset_config::LbSubsetFallbackPolicy", tag = "1")]
961 pub fallback_policy: i32,
962 ///
963 /// Specifies the default subset of endpoints used during fallback if
964 /// fallback_policy is
965 /// : ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
966 /// Each field in default_subset is
967 /// compared to the matching LbEndpoint.Metadata under the `envoy.lb`
968 /// namespace. It is valid for no hosts to match, in which case the behavior
969 /// is the same as a fallback_policy of
970 /// : ref:`NO_FALLBACK<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
971 #[prost(message, optional, tag = "2")]
972 pub default_subset: ::core::option::Option<
973 super::super::super::super::super::google::protobuf::Struct,
974 >,
975 /// For each entry, LbEndpoint.Metadata's
976 /// `envoy.lb` namespace is traversed and a subset is created for each unique
977 /// combination of key and value. For example:
978 ///
979 /// .. code-block:: json
980 ///
981 /// { "subset_selectors": \[
982 /// { "keys": \[ "version" \] },
983 /// { "keys": \[ "stage", "hardware_type" \] }
984 /// \]}
985 ///
986 /// A subset is matched when the metadata from the selected route and
987 /// weighted cluster contains the same keys and values as the subset's
988 /// metadata. The same host may appear in multiple subsets.
989 #[prost(message, repeated, tag = "3")]
990 pub subset_selectors: ::prost::alloc::vec::Vec<
991 lb_subset_config::LbSubsetSelector,
992 >,
993 /// If true, routing to subsets will take into account the localities and locality weights of the
994 /// endpoints when making the routing decision.
995 ///
996 /// There are some potential pitfalls associated with enabling this feature, as the resulting
997 /// traffic split after applying both a subset match and locality weights might be undesirable.
998 ///
999 /// Consider for example a situation in which you have 50/50 split across two localities X/Y
1000 /// which have 100 hosts each without subsetting. If the subset LB results in X having only 1
1001 /// host selected but Y having 100, then a lot more load is being dumped on the single host in X
1002 /// than originally anticipated in the load balancing assignment delivered via EDS.
1003 #[prost(bool, tag = "4")]
1004 pub locality_weight_aware: bool,
1005 /// When used with locality_weight_aware, scales the weight of each locality by the ratio
1006 /// of hosts in the subset vs hosts in the original subset. This aims to even out the load
1007 /// going to an individual locality if said locality is disproportionately affected by the
1008 /// subset predicate.
1009 #[prost(bool, tag = "5")]
1010 pub scale_locality_weight: bool,
1011 /// If true, when a fallback policy is configured and its corresponding subset fails to find
1012 /// a host this will cause any host to be selected instead.
1013 ///
1014 /// This is useful when using the default subset as the fallback policy, given the default
1015 /// subset might become empty. With this option enabled, if that happens the LB will attempt
1016 /// to select a host from the entire cluster.
1017 #[prost(bool, tag = "6")]
1018 pub panic_mode_any: bool,
1019 /// If true, metadata specified for a metadata key will be matched against the corresponding
1020 /// endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value
1021 /// and any of the elements in the list matches the criteria.
1022 #[prost(bool, tag = "7")]
1023 pub list_as_any: bool,
1024 ///
1025 /// Fallback mechanism that allows to try different route metadata until a host is found.
1026 /// If load balancing process, including all its mechanisms (like
1027 /// : ref:`fallback_policy<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.fallback_policy>`)
1028 /// fails to select a host, this policy decides if and how the process is repeated using another metadata.
1029 ///
1030 /// The value defaults to
1031 /// : ref:`METADATA_NO_FALLBACK<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
1032 #[prost(
1033 enumeration = "lb_subset_config::LbSubsetMetadataFallbackPolicy",
1034 tag = "8"
1035 )]
1036 pub metadata_fallback_policy: i32,
1037 }
1038 /// Nested message and enum types in `LbSubsetConfig`.
1039 pub mod lb_subset_config {
1040 /// Specifications for subsets.
1041 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1042 pub struct LbSubsetSelector {
1043 /// List of keys to match with the weighted cluster metadata.
1044 #[prost(string, repeated, tag = "1")]
1045 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1046 /// Selects a mode of operation in which each subset has only one host. This mode uses the same rules for
1047 /// choosing a host, but updating hosts is faster, especially for large numbers of hosts.
1048 ///
1049 /// If a match is found to a host, that host will be used regardless of priority levels.
1050 ///
1051 ///
1052 /// When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in `keys`
1053 /// will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge
1054 /// : ref:`lb_subsets_single_host_per_subset_duplicate<config_cluster_manager_cluster_stats_subset_lb>` indicates how many duplicates are
1055 /// present in the current configuration.
1056 #[prost(bool, tag = "4")]
1057 pub single_host_per_subset: bool,
1058 /// The behavior used when no endpoint subset matches the selected route's
1059 /// metadata.
1060 #[prost(
1061 enumeration = "lb_subset_selector::LbSubsetSelectorFallbackPolicy",
1062 tag = "2"
1063 )]
1064 pub fallback_policy: i32,
1065 ///
1066 /// Subset of
1067 /// : ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
1068 /// : ref:`KEYS_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
1069 /// fallback policy.
1070 /// It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
1071 /// For any other fallback policy the parameter is not used and should not be set.
1072 /// Only values also present in
1073 /// : ref:`keys<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
1074 /// `fallback_keys_subset` cannot be equal to `keys`.
1075 #[prost(string, repeated, tag = "3")]
1076 pub fallback_keys_subset: ::prost::alloc::vec::Vec<
1077 ::prost::alloc::string::String,
1078 >,
1079 }
1080 /// Nested message and enum types in `LbSubsetSelector`.
1081 pub mod lb_subset_selector {
1082 /// Allows to override top level fallback policy per selector.
1083 #[derive(
1084 Clone,
1085 Copy,
1086 Debug,
1087 PartialEq,
1088 Eq,
1089 Hash,
1090 PartialOrd,
1091 Ord,
1092 ::prost::Enumeration
1093 )]
1094 #[repr(i32)]
1095 pub enum LbSubsetSelectorFallbackPolicy {
1096 /// If NOT_DEFINED top level config fallback policy is used instead.
1097 NotDefined = 0,
1098 /// If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported.
1099 NoFallback = 1,
1100 /// If ANY_ENDPOINT is selected, any cluster endpoint may be returned
1101 /// (subject to policy, health checks, etc).
1102 AnyEndpoint = 2,
1103 /// If DEFAULT_SUBSET is selected, load balancing is performed over the
1104 /// endpoints matching the values from the default_subset field.
1105 DefaultSubset = 3,
1106 ///
1107 /// If KEYS_SUBSET is selected, subset selector matching is performed again with metadata
1108 /// keys reduced to
1109 /// : ref:`fallback_keys_subset<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_keys_subset>`.
1110 /// It allows for a fallback to a different, less specific selector if some of the keys of
1111 /// the selector are considered optional.
1112 KeysSubset = 4,
1113 }
1114 impl LbSubsetSelectorFallbackPolicy {
1115 /// String value of the enum field names used in the ProtoBuf definition.
1116 ///
1117 /// The values are not transformed in any way and thus are considered stable
1118 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1119 pub fn as_str_name(&self) -> &'static str {
1120 match self {
1121 Self::NotDefined => "NOT_DEFINED",
1122 Self::NoFallback => "NO_FALLBACK",
1123 Self::AnyEndpoint => "ANY_ENDPOINT",
1124 Self::DefaultSubset => "DEFAULT_SUBSET",
1125 Self::KeysSubset => "KEYS_SUBSET",
1126 }
1127 }
1128 /// Creates an enum from field names used in the ProtoBuf definition.
1129 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1130 match value {
1131 "NOT_DEFINED" => Some(Self::NotDefined),
1132 "NO_FALLBACK" => Some(Self::NoFallback),
1133 "ANY_ENDPOINT" => Some(Self::AnyEndpoint),
1134 "DEFAULT_SUBSET" => Some(Self::DefaultSubset),
1135 "KEYS_SUBSET" => Some(Self::KeysSubset),
1136 _ => None,
1137 }
1138 }
1139 }
1140 }
1141 /// If NO_FALLBACK is selected, a result
1142 /// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected,
1143 /// any cluster endpoint may be returned (subject to policy, health checks,
1144 /// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the
1145 /// endpoints matching the values from the default_subset field.
1146 #[derive(
1147 Clone,
1148 Copy,
1149 Debug,
1150 PartialEq,
1151 Eq,
1152 Hash,
1153 PartialOrd,
1154 Ord,
1155 ::prost::Enumeration
1156 )]
1157 #[repr(i32)]
1158 pub enum LbSubsetFallbackPolicy {
1159 NoFallback = 0,
1160 AnyEndpoint = 1,
1161 DefaultSubset = 2,
1162 }
1163 impl LbSubsetFallbackPolicy {
1164 /// String value of the enum field names used in the ProtoBuf definition.
1165 ///
1166 /// The values are not transformed in any way and thus are considered stable
1167 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1168 pub fn as_str_name(&self) -> &'static str {
1169 match self {
1170 Self::NoFallback => "NO_FALLBACK",
1171 Self::AnyEndpoint => "ANY_ENDPOINT",
1172 Self::DefaultSubset => "DEFAULT_SUBSET",
1173 }
1174 }
1175 /// Creates an enum from field names used in the ProtoBuf definition.
1176 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1177 match value {
1178 "NO_FALLBACK" => Some(Self::NoFallback),
1179 "ANY_ENDPOINT" => Some(Self::AnyEndpoint),
1180 "DEFAULT_SUBSET" => Some(Self::DefaultSubset),
1181 _ => None,
1182 }
1183 }
1184 }
1185 #[derive(
1186 Clone,
1187 Copy,
1188 Debug,
1189 PartialEq,
1190 Eq,
1191 Hash,
1192 PartialOrd,
1193 Ord,
1194 ::prost::Enumeration
1195 )]
1196 #[repr(i32)]
1197 pub enum LbSubsetMetadataFallbackPolicy {
1198 /// No fallback. Route metadata will be used as-is.
1199 MetadataNoFallback = 0,
1200 /// A special metadata key `fallback_list` will be used to provide variants of metadata to try.
1201 /// Value of `fallback_list` key has to be a list. Every list element has to be a struct - it will
1202 /// be merged with route metadata, overriding keys that appear in both places.
1203 /// `fallback_list` entries will be used in order until a host is found.
1204 ///
1205 /// `fallback_list` key itself is removed from metadata before subset load balancing is performed.
1206 ///
1207 /// Example:
1208 ///
1209 /// for metadata:
1210 ///
1211 /// .. code-block:: yaml
1212 ///
1213 /// version: 1.0
1214 /// fallback_list:
1215 /// - version: 2.0
1216 /// hardware: c64
1217 /// - hardware: c32
1218 /// - version: 3.0
1219 ///
1220 /// at first, metadata:
1221 ///
1222 /// .. code-block:: json
1223 ///
1224 /// {"version": "2.0", "hardware": "c64"}
1225 ///
1226 /// will be used for load balancing. If no host is found, metadata:
1227 ///
1228 /// .. code-block:: json
1229 ///
1230 /// {"version": "1.0", "hardware": "c32"}
1231 ///
1232 /// is next to try. If it still results in no host, finally metadata:
1233 ///
1234 /// .. code-block:: json
1235 ///
1236 /// {"version": "3.0"}
1237 ///
1238 /// is used.
1239 FallbackList = 1,
1240 }
1241 impl LbSubsetMetadataFallbackPolicy {
1242 /// String value of the enum field names used in the ProtoBuf definition.
1243 ///
1244 /// The values are not transformed in any way and thus are considered stable
1245 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1246 pub fn as_str_name(&self) -> &'static str {
1247 match self {
1248 Self::MetadataNoFallback => "METADATA_NO_FALLBACK",
1249 Self::FallbackList => "FALLBACK_LIST",
1250 }
1251 }
1252 /// Creates an enum from field names used in the ProtoBuf definition.
1253 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1254 match value {
1255 "METADATA_NO_FALLBACK" => Some(Self::MetadataNoFallback),
1256 "FALLBACK_LIST" => Some(Self::FallbackList),
1257 _ => None,
1258 }
1259 }
1260 }
1261 }
1262 /// Configuration for :ref:`slow start mode <arch_overview_load_balancing_slow_start>`.
1263 #[derive(Clone, PartialEq, ::prost::Message)]
1264 pub struct SlowStartConfig {
1265 /// Represents the size of slow start window.
1266 /// If set, the newly created host remains in slow start mode starting from its creation time
1267 /// for the duration of slow start window.
1268 #[prost(message, optional, tag = "1")]
1269 pub slow_start_window: ::core::option::Option<
1270 super::super::super::super::super::google::protobuf::Duration,
1271 >,
1272 /// This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0,
1273 /// so that endpoint would get linearly increasing amount of traffic.
1274 /// When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly.
1275 /// The value of aggression parameter should be greater than 0.0.
1276 /// By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve.
1277 ///
1278 /// During slow start window, effective weight of an endpoint would be scaled with time factor and aggression:
1279 /// `new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))`,
1280 /// where `time_factor=(time_since_start_seconds / slow_start_time_seconds)`.
1281 ///
1282 /// As time progresses, more and more traffic would be sent to endpoint, which is in slow start window.
1283 /// Once host exits slow start, time_factor and aggression no longer affect its weight.
1284 #[prost(message, optional, tag = "2")]
1285 pub aggression: ::core::option::Option<
1286 super::super::super::core::v3::RuntimeDouble,
1287 >,
1288 /// Configures the minimum percentage of origin weight that avoids too small new weight,
1289 /// which may cause endpoints in slow start mode receive no traffic in slow start window.
1290 /// If not specified, the default is 10%.
1291 #[prost(message, optional, tag = "3")]
1292 pub min_weight_percent: ::core::option::Option<
1293 super::super::super::super::r#type::v3::Percent,
1294 >,
1295 }
1296 /// Specific configuration for the RoundRobin load balancing policy.
1297 #[derive(Clone, PartialEq, ::prost::Message)]
1298 pub struct RoundRobinLbConfig {
1299 /// Configuration for slow start mode.
1300 /// If this configuration is not set, slow start will not be not enabled.
1301 #[prost(message, optional, tag = "1")]
1302 pub slow_start_config: ::core::option::Option<SlowStartConfig>,
1303 }
1304 /// Specific configuration for the LeastRequest load balancing policy.
1305 #[derive(Clone, PartialEq, ::prost::Message)]
1306 pub struct LeastRequestLbConfig {
1307 /// The number of random healthy hosts from which the host with the fewest active requests will
1308 /// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
1309 #[prost(message, optional, tag = "1")]
1310 pub choice_count: ::core::option::Option<
1311 super::super::super::super::super::google::protobuf::UInt32Value,
1312 >,
1313 /// The following formula is used to calculate the dynamic weights when hosts have different load
1314 /// balancing weights:
1315 ///
1316 /// `weight = load_balancing_weight / (active_requests + 1)^active_request_bias`
1317 ///
1318 /// The larger the active request bias is, the more aggressively active requests will lower the
1319 /// effective weight when all host weights are not equal.
1320 ///
1321 /// `active_request_bias` must be greater than or equal to 0.0.
1322 ///
1323 /// When `active_request_bias == 0.0` the Least Request Load Balancer doesn't consider the number
1324 /// of active requests at the time it picks a host and behaves like the Round Robin Load
1325 /// Balancer.
1326 ///
1327 /// When `active_request_bias > 0.0` the Least Request Load Balancer scales the load balancing
1328 /// weight by the number of active requests at the time it does a pick.
1329 ///
1330 /// The value is cached for performance reasons and refreshed whenever one of the Load Balancer's
1331 /// host sets changes, e.g., whenever there is a host membership update or a host load balancing
1332 /// weight change.
1333 ///
1334 /// .. note::
1335 /// This setting only takes effect if all host weights are not equal.
1336 #[prost(message, optional, tag = "2")]
1337 pub active_request_bias: ::core::option::Option<
1338 super::super::super::core::v3::RuntimeDouble,
1339 >,
1340 /// Configuration for slow start mode.
1341 /// If this configuration is not set, slow start will not be not enabled.
1342 #[prost(message, optional, tag = "3")]
1343 pub slow_start_config: ::core::option::Option<SlowStartConfig>,
1344 }
1345 /// Specific configuration for the :ref:`RingHash<arch_overview_load_balancing_types_ring_hash>`
1346 /// load balancing policy.
1347 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1348 pub struct RingHashLbConfig {
1349 ///
1350 /// Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each
1351 /// provided host) the better the request distribution will reflect the desired weights. Defaults
1352 /// to 1024 entries, and limited to 8M entries. See also
1353 /// : ref:`maximum_ring_size<envoy_v3_api_field_config.cluster.v3.Cluster.RingHashLbConfig.maximum_ring_size>`.
1354 #[prost(message, optional, tag = "1")]
1355 pub minimum_ring_size: ::core::option::Option<
1356 super::super::super::super::super::google::protobuf::UInt64Value,
1357 >,
1358 ///
1359 /// The hash function used to hash hosts onto the ketama ring. The value defaults to
1360 /// : ref:`XX_HASH<envoy_v3_api_enum_value_config.cluster.v3.Cluster.RingHashLbConfig.HashFunction.XX_HASH>`.
1361 #[prost(enumeration = "ring_hash_lb_config::HashFunction", tag = "3")]
1362 pub hash_function: i32,
1363 ///
1364 /// Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered
1365 /// to further constrain resource use. See also
1366 /// : ref:`minimum_ring_size<envoy_v3_api_field_config.cluster.v3.Cluster.RingHashLbConfig.minimum_ring_size>`.
1367 #[prost(message, optional, tag = "4")]
1368 pub maximum_ring_size: ::core::option::Option<
1369 super::super::super::super::super::google::protobuf::UInt64Value,
1370 >,
1371 }
1372 /// Nested message and enum types in `RingHashLbConfig`.
1373 pub mod ring_hash_lb_config {
1374 /// The hash function used to hash hosts onto the ketama ring.
1375 #[derive(
1376 Clone,
1377 Copy,
1378 Debug,
1379 PartialEq,
1380 Eq,
1381 Hash,
1382 PartialOrd,
1383 Ord,
1384 ::prost::Enumeration
1385 )]
1386 #[repr(i32)]
1387 pub enum HashFunction {
1388 /// Use `xxHash <<https://github.com/Cyan4973/xxHash>`\_,> this is the default hash function.
1389 XxHash = 0,
1390 /// Use `MurmurHash2 <<https://sites.google.com/site/murmurhash/>`\_,> this is compatible with
1391 /// std:hash<string> in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled
1392 /// on Linux and not macOS.
1393 MurmurHash2 = 1,
1394 }
1395 impl HashFunction {
1396 /// String value of the enum field names used in the ProtoBuf definition.
1397 ///
1398 /// The values are not transformed in any way and thus are considered stable
1399 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1400 pub fn as_str_name(&self) -> &'static str {
1401 match self {
1402 Self::XxHash => "XX_HASH",
1403 Self::MurmurHash2 => "MURMUR_HASH_2",
1404 }
1405 }
1406 /// Creates an enum from field names used in the ProtoBuf definition.
1407 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1408 match value {
1409 "XX_HASH" => Some(Self::XxHash),
1410 "MURMUR_HASH_2" => Some(Self::MurmurHash2),
1411 _ => None,
1412 }
1413 }
1414 }
1415 }
1416 /// Specific configuration for the :ref:`Maglev<arch_overview_load_balancing_types_maglev>`
1417 /// load balancing policy.
1418 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1419 pub struct MaglevLbConfig {
1420 /// The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee.
1421 /// Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same
1422 /// upstream as it was before. Increasing the table size reduces the amount of disruption.
1423 /// The table size must be prime number limited to 5000011. If it is not specified, the default is 65537.
1424 #[prost(message, optional, tag = "1")]
1425 pub table_size: ::core::option::Option<
1426 super::super::super::super::super::google::protobuf::UInt64Value,
1427 >,
1428 }
1429 ///
1430 /// Specific configuration for the
1431 /// : ref:`Original Destination <arch_overview_load_balancing_types_original_destination>`
1432 /// load balancing policy.
1433 /// \[\#extension: envoy.clusters.original_dst\]
1434 #[derive(Clone, PartialEq, ::prost::Message)]
1435 pub struct OriginalDstLbConfig {
1436 ///
1437 /// When true, a HTTP header can be used to override the original dst address. The default header is
1438 /// : ref:`x-envoy-original-dst-host <config_http_conn_man_headers_x-envoy-original-dst-host>`.
1439 ///
1440 ///
1441 /// .. attention::
1442 ///
1443 /// This header isn't sanitized by default, so enabling this feature allows HTTP clients to
1444 /// route traffic to arbitrary hosts and/or ports, which may have serious security
1445 /// consequences.
1446 ///
1447 /// .. note::
1448 ///
1449 /// If the header appears multiple times only the first value is used.
1450 #[prost(bool, tag = "1")]
1451 pub use_http_header: bool,
1452 /// The http header to override destination address if :ref:`use_http_header <envoy_v3_api_field_config.cluster.v3.Cluster.OriginalDstLbConfig.use_http_header>`.
1453 /// is set to true. If the value is empty, :ref:`x-envoy-original-dst-host <config_http_conn_man_headers_x-envoy-original-dst-host>` will be used.
1454 #[prost(string, tag = "2")]
1455 pub http_header_name: ::prost::alloc::string::String,
1456 /// The port to override for the original dst address. This port
1457 /// will take precedence over filter state and header override ports
1458 #[prost(message, optional, tag = "3")]
1459 pub upstream_port_override: ::core::option::Option<
1460 super::super::super::super::super::google::protobuf::UInt32Value,
1461 >,
1462 /// The dynamic metadata key to override destination address.
1463 /// First the request metadata is considered, then the connection one.
1464 #[prost(message, optional, tag = "4")]
1465 pub metadata_key: ::core::option::Option<
1466 super::super::super::super::r#type::metadata::v3::MetadataKey,
1467 >,
1468 }
1469 /// Common configuration for all load balancer implementations.
1470 /// \[\#next-free-field: 9\]
1471 #[derive(Clone, PartialEq, ::prost::Message)]
1472 pub struct CommonLbConfig {
1473 /// Configures the :ref:`healthy panic threshold <arch_overview_load_balancing_panic_threshold>`.
1474 /// If not specified, the default is 50%.
1475 /// To disable panic mode, set to 0%.
1476 ///
1477 /// .. note::
1478 /// The specified percent will be truncated to the nearest 1%.
1479 #[prost(message, optional, tag = "1")]
1480 pub healthy_panic_threshold: ::core::option::Option<
1481 super::super::super::super::r#type::v3::Percent,
1482 >,
1483 /// If set, all health check/weight/metadata updates that happen within this duration will be
1484 /// merged and delivered in one shot when the duration expires. The start of the duration is when
1485 /// the first update happens. This is useful for big clusters, with potentially noisy deploys
1486 /// that might trigger excessive CPU usage due to a constant stream of healthcheck state changes
1487 /// or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new
1488 /// cluster). Please always keep in mind that the use of sandbox technologies may change this
1489 /// behavior.
1490 ///
1491 /// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
1492 /// window to 0.
1493 ///
1494 /// .. note::
1495 /// Merging does not apply to cluster membership changes (e.g.: adds/removes); this is
1496 /// because merging those updates isn't currently safe. See
1497 /// <https://github.com/envoyproxy/envoy/pull/3941.>
1498 #[prost(message, optional, tag = "4")]
1499 pub update_merge_window: ::core::option::Option<
1500 super::super::super::super::super::google::protobuf::Duration,
1501 >,
1502 /// If set to true, Envoy will :ref:`exclude <arch_overview_load_balancing_excluded>` new hosts
1503 /// when computing load balancing weights until they have been health checked for the first time.
1504 /// This will have no effect unless active health checking is also configured.
1505 #[prost(bool, tag = "5")]
1506 pub ignore_new_hosts_until_first_hc: bool,
1507 /// If set to `true`, the cluster manager will drain all existing
1508 /// connections to upstream hosts whenever hosts are added or removed from the cluster.
1509 #[prost(bool, tag = "6")]
1510 pub close_connections_on_host_set_change: bool,
1511 /// Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.)
1512 #[prost(message, optional, tag = "7")]
1513 pub consistent_hashing_lb_config: ::core::option::Option<
1514 common_lb_config::ConsistentHashingLbConfig,
1515 >,
1516 ///
1517 /// This controls what hosts are considered valid when using
1518 /// : ref:`host overrides <arch_overview_load_balancing_override_host>`, which is used by some
1519 /// filters to modify the load balancing decision.
1520 ///
1521 ///
1522 /// If this is unset then \[UNKNOWN, HEALTHY, DEGRADED\] will be applied by default. If this is
1523 /// set with an empty set of statuses then host overrides will be ignored by the load balancing.
1524 #[prost(message, optional, tag = "8")]
1525 pub override_host_status: ::core::option::Option<
1526 super::super::super::core::v3::HealthStatusSet,
1527 >,
1528 #[prost(oneof = "common_lb_config::LocalityConfigSpecifier", tags = "2, 3")]
1529 pub locality_config_specifier: ::core::option::Option<
1530 common_lb_config::LocalityConfigSpecifier,
1531 >,
1532 }
1533 /// Nested message and enum types in `CommonLbConfig`.
1534 pub mod common_lb_config {
1535 /// Configuration for :ref:`zone aware routing <arch_overview_load_balancing_zone_aware_routing>`.
1536 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1537 pub struct ZoneAwareLbConfig {
1538 /// Configures percentage of requests that will be considered for zone aware routing
1539 /// if zone aware routing is configured. If not specified, the default is 100%.
1540 ///
1541 /// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
1542 /// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
1543 #[prost(message, optional, tag = "1")]
1544 pub routing_enabled: ::core::option::Option<
1545 super::super::super::super::super::r#type::v3::Percent,
1546 >,
1547 /// Configures minimum upstream cluster size required for zone aware routing
1548 /// If upstream cluster size is less than specified, zone aware routing is not performed
1549 /// even if zone aware routing is configured. If not specified, the default is 6.
1550 ///
1551 /// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
1552 /// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
1553 #[prost(message, optional, tag = "2")]
1554 pub min_cluster_size: ::core::option::Option<
1555 super::super::super::super::super::super::google::protobuf::UInt64Value,
1556 >,
1557 /// If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic mode<arch_overview_load_balancing_panic_threshold>`. Instead, the cluster will fail all
1558 /// requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
1559 /// failing service.
1560 #[prost(bool, tag = "3")]
1561 pub fail_traffic_on_panic: bool,
1562 }
1563 /// Configuration for :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`
1564 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1565 pub struct LocalityWeightedLbConfig {}
1566 /// Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.)
1567 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1568 pub struct ConsistentHashingLbConfig {
1569 /// If set to `true`, the cluster will use hostname instead of the resolved
1570 /// address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address.
1571 #[prost(bool, tag = "1")]
1572 pub use_hostname_for_hashing: bool,
1573 /// Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150
1574 /// no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster.
1575 /// If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200.
1576 /// Minimum is 100.
1577 ///
1578 /// Applies to both Ring Hash and Maglev load balancers.
1579 ///
1580 /// This is implemented based on the method described in the paper <https://arxiv.org/abs/1608.01350.> For the specified
1581 /// `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests
1582 /// across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing
1583 /// is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify
1584 /// the eligible host (this technique is as described in the paper <https://arxiv.org/abs/1908.08762> - the random jump avoids the
1585 /// cascading overflow effect when choosing the next host in the ring/table).
1586 ///
1587 /// If weights are specified on the hosts, they are respected.
1588 ///
1589 /// This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts
1590 /// being probed, so use a higher value if you require better performance.
1591 #[prost(message, optional, tag = "2")]
1592 pub hash_balance_factor: ::core::option::Option<
1593 super::super::super::super::super::super::google::protobuf::UInt32Value,
1594 >,
1595 }
1596 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1597 pub enum LocalityConfigSpecifier {
1598 #[prost(message, tag = "2")]
1599 ZoneAwareLbConfig(ZoneAwareLbConfig),
1600 #[prost(message, tag = "3")]
1601 LocalityWeightedLbConfig(LocalityWeightedLbConfig),
1602 }
1603 }
1604 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1605 pub struct RefreshRate {
1606 ///
1607 /// Specifies the base interval between refreshes. This parameter is required and must be greater
1608 /// than zero and less than
1609 /// : ref:`max_interval <envoy_v3_api_field_config.cluster.v3.Cluster.RefreshRate.max_interval>`.
1610 #[prost(message, optional, tag = "1")]
1611 pub base_interval: ::core::option::Option<
1612 super::super::super::super::super::google::protobuf::Duration,
1613 >,
1614 ///
1615 /// Specifies the maximum interval between refreshes. This parameter is optional, but must be
1616 /// greater than or equal to the
1617 /// : ref:`base_interval <envoy_v3_api_field_config.cluster.v3.Cluster.RefreshRate.base_interval>` if set. The default
1618 /// is 10 times the :ref:`base_interval <envoy_v3_api_field_config.cluster.v3.Cluster.RefreshRate.base_interval>`.
1619 #[prost(message, optional, tag = "2")]
1620 pub max_interval: ::core::option::Option<
1621 super::super::super::super::super::google::protobuf::Duration,
1622 >,
1623 }
1624 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1625 pub struct PreconnectPolicy {
1626 /// Indicates how many streams (rounded up) can be anticipated per-upstream for each
1627 /// incoming stream. This is useful for high-QPS or latency-sensitive services. Preconnecting
1628 /// will only be done if the upstream is healthy and the cluster has traffic.
1629 ///
1630 /// For example if this is 2, for an incoming HTTP/1.1 stream, 2 connections will be
1631 /// established, one for the new incoming stream, and one for a presumed follow-up stream. For
1632 /// HTTP/2, only one connection would be established by default as one connection can
1633 /// serve both the original and presumed follow-up stream.
1634 ///
1635 /// In steady state for non-multiplexed connections a value of 1.5 would mean if there were 100
1636 /// active streams, there would be 100 connections in use, and 50 connections preconnected.
1637 /// This might be a useful value for something like short lived single-use connections,
1638 /// for example proxying HTTP/1.1 if keep-alive were false and each stream resulted in connection
1639 /// termination. It would likely be overkill for long lived connections, such as TCP proxying SMTP
1640 /// or regular HTTP/1.1 with keep-alive. For long lived traffic, a value of 1.05 would be more
1641 /// reasonable, where for every 100 connections, 5 preconnected connections would be in the queue
1642 /// in case of unexpected disconnects where the connection could not be reused.
1643 ///
1644 /// If this value is not set, or set explicitly to one, Envoy will fetch as many connections
1645 /// as needed to serve streams in flight. This means in steady state if a connection is torn down,
1646 /// a subsequent streams will pay an upstream-rtt latency penalty waiting for a new connection.
1647 ///
1648 /// This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can
1649 /// harm latency more than the preconnecting helps.
1650 #[prost(message, optional, tag = "1")]
1651 pub per_upstream_preconnect_ratio: ::core::option::Option<
1652 super::super::super::super::super::google::protobuf::DoubleValue,
1653 >,
1654 /// Indicates how many streams (rounded up) can be anticipated across a cluster for each
1655 /// stream, useful for low QPS services. This is currently supported for a subset of
1656 /// deterministic non-hash-based load-balancing algorithms (weighted round robin, random).
1657 /// Unlike `per_upstream_preconnect_ratio` this preconnects across the upstream instances in a
1658 /// cluster, doing best effort predictions of what upstream would be picked next and
1659 /// pre-establishing a connection.
1660 ///
1661 /// Preconnecting will be limited to one preconnect per configured upstream in the cluster and will
1662 /// only be done if there are healthy upstreams and the cluster has traffic.
1663 ///
1664 /// For example if preconnecting is set to 2 for a round robin HTTP/2 cluster, on the first
1665 /// incoming stream, 2 connections will be preconnected - one to the first upstream for this
1666 /// cluster, one to the second on the assumption there will be a follow-up stream.
1667 ///
1668 /// If this value is not set, or set explicitly to one, Envoy will fetch as many connections
1669 /// as needed to serve streams in flight, so during warm up and in steady state if a connection
1670 /// is closed (and per_upstream_preconnect_ratio is not set), there will be a latency hit for
1671 /// connection establishment.
1672 ///
1673 /// If both this and preconnect_ratio are set, Envoy will make sure both predicted needs are met,
1674 /// basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each
1675 /// upstream.
1676 #[prost(message, optional, tag = "2")]
1677 pub predictive_preconnect_ratio: ::core::option::Option<
1678 super::super::super::super::super::google::protobuf::DoubleValue,
1679 >,
1680 }
1681 /// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
1682 /// for an explanation on each type.
1683 #[derive(
1684 Clone,
1685 Copy,
1686 Debug,
1687 PartialEq,
1688 Eq,
1689 Hash,
1690 PartialOrd,
1691 Ord,
1692 ::prost::Enumeration
1693 )]
1694 #[repr(i32)]
1695 pub enum DiscoveryType {
1696 /// Refer to the :ref:`static discovery type<arch_overview_service_discovery_types_static>`
1697 /// for an explanation.
1698 Static = 0,
1699 /// Refer to the :ref:`strict DNS discovery type<arch_overview_service_discovery_types_strict_dns>`
1700 /// for an explanation.
1701 StrictDns = 1,
1702 /// Refer to the :ref:`logical DNS discovery type<arch_overview_service_discovery_types_logical_dns>`
1703 /// for an explanation.
1704 LogicalDns = 2,
1705 /// Refer to the :ref:`service discovery type<arch_overview_service_discovery_types_eds>`
1706 /// for an explanation.
1707 Eds = 3,
1708 /// Refer to the :ref:`original destination discovery type<arch_overview_service_discovery_types_original_destination>`
1709 /// for an explanation.
1710 OriginalDst = 4,
1711 }
1712 impl DiscoveryType {
1713 /// String value of the enum field names used in the ProtoBuf definition.
1714 ///
1715 /// The values are not transformed in any way and thus are considered stable
1716 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1717 pub fn as_str_name(&self) -> &'static str {
1718 match self {
1719 Self::Static => "STATIC",
1720 Self::StrictDns => "STRICT_DNS",
1721 Self::LogicalDns => "LOGICAL_DNS",
1722 Self::Eds => "EDS",
1723 Self::OriginalDst => "ORIGINAL_DST",
1724 }
1725 }
1726 /// Creates an enum from field names used in the ProtoBuf definition.
1727 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1728 match value {
1729 "STATIC" => Some(Self::Static),
1730 "STRICT_DNS" => Some(Self::StrictDns),
1731 "LOGICAL_DNS" => Some(Self::LogicalDns),
1732 "EDS" => Some(Self::Eds),
1733 "ORIGINAL_DST" => Some(Self::OriginalDst),
1734 _ => None,
1735 }
1736 }
1737 }
1738 /// Refer to :ref:`load balancer type <arch_overview_load_balancing_types>` architecture
1739 /// overview section for information on each type.
1740 #[derive(
1741 Clone,
1742 Copy,
1743 Debug,
1744 PartialEq,
1745 Eq,
1746 Hash,
1747 PartialOrd,
1748 Ord,
1749 ::prost::Enumeration
1750 )]
1751 #[repr(i32)]
1752 pub enum LbPolicy {
1753 /// Refer to the :ref:`round robin load balancing policy<arch_overview_load_balancing_types_round_robin>`
1754 /// for an explanation.
1755 RoundRobin = 0,
1756 /// Refer to the :ref:`least request load balancing policy<arch_overview_load_balancing_types_least_request>`
1757 /// for an explanation.
1758 LeastRequest = 1,
1759 /// Refer to the :ref:`ring hash load balancing policy<arch_overview_load_balancing_types_ring_hash>`
1760 /// for an explanation.
1761 RingHash = 2,
1762 /// Refer to the :ref:`random load balancing policy<arch_overview_load_balancing_types_random>`
1763 /// for an explanation.
1764 Random = 3,
1765 /// Refer to the :ref:`Maglev load balancing policy<arch_overview_load_balancing_types_maglev>`
1766 /// for an explanation.
1767 Maglev = 5,
1768 /// This load balancer type must be specified if the configured cluster provides a cluster
1769 /// specific load balancer. Consult the configured cluster's documentation for whether to set
1770 /// this option or not.
1771 ClusterProvided = 6,
1772 /// Use the new :ref:`load_balancing_policy <envoy_v3_api_field_config.cluster.v3.Cluster.load_balancing_policy>` field to determine the LB policy.
1773 /// This has been deprecated in favor of using the :ref:`load_balancing_policy <envoy_v3_api_field_config.cluster.v3.Cluster.load_balancing_policy>` field without
1774 /// setting any value in :ref:`lb_policy<envoy_v3_api_field_config.cluster.v3.Cluster.lb_policy>`.
1775 LoadBalancingPolicyConfig = 7,
1776 }
1777 impl LbPolicy {
1778 /// String value of the enum field names used in the ProtoBuf definition.
1779 ///
1780 /// The values are not transformed in any way and thus are considered stable
1781 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1782 pub fn as_str_name(&self) -> &'static str {
1783 match self {
1784 Self::RoundRobin => "ROUND_ROBIN",
1785 Self::LeastRequest => "LEAST_REQUEST",
1786 Self::RingHash => "RING_HASH",
1787 Self::Random => "RANDOM",
1788 Self::Maglev => "MAGLEV",
1789 Self::ClusterProvided => "CLUSTER_PROVIDED",
1790 Self::LoadBalancingPolicyConfig => "LOAD_BALANCING_POLICY_CONFIG",
1791 }
1792 }
1793 /// Creates an enum from field names used in the ProtoBuf definition.
1794 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1795 match value {
1796 "ROUND_ROBIN" => Some(Self::RoundRobin),
1797 "LEAST_REQUEST" => Some(Self::LeastRequest),
1798 "RING_HASH" => Some(Self::RingHash),
1799 "RANDOM" => Some(Self::Random),
1800 "MAGLEV" => Some(Self::Maglev),
1801 "CLUSTER_PROVIDED" => Some(Self::ClusterProvided),
1802 "LOAD_BALANCING_POLICY_CONFIG" => Some(Self::LoadBalancingPolicyConfig),
1803 _ => None,
1804 }
1805 }
1806 }
1807 ///
1808 /// When V4_ONLY is selected, the DNS resolver will only perform a lookup for
1809 /// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will
1810 /// only perform a lookup for addresses in the IPv6 family. If AUTO is
1811 /// specified, the DNS resolver will first perform a lookup for addresses in
1812 /// the IPv6 family and fallback to a lookup for addresses in the IPv4 family.
1813 /// This is semantically equivalent to a non-existent V6_PREFERRED option.
1814 /// AUTO is a legacy name that is more opaque than
1815 /// necessary and will be deprecated in favor of V6_PREFERRED in a future major version of the API.
1816 /// If V4_PREFERRED is specified, the DNS resolver will first perform a lookup for addresses in the
1817 /// IPv4 family and fallback to a lookup for addresses in the IPv6 family. i.e., the callback
1818 /// target will only get v6 addresses if there were NO v4 addresses to return.
1819 /// If ALL is specified, the DNS resolver will perform a lookup for both IPv4 and IPv6 families,
1820 /// and return all resolved addresses. When this is used, Happy Eyeballs will be enabled for
1821 /// upstream connections. Refer to :ref:`Happy Eyeballs Support <arch_overview_happy_eyeballs>`
1822 /// for more information.
1823 /// For cluster types other than
1824 /// : ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>` and
1825 /// : ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`,
1826 /// this setting is
1827 /// ignored.
1828 /// \[\#next-major-version: deprecate AUTO in favor of a V6_PREFERRED option.\]
1829 #[derive(
1830 Clone,
1831 Copy,
1832 Debug,
1833 PartialEq,
1834 Eq,
1835 Hash,
1836 PartialOrd,
1837 Ord,
1838 ::prost::Enumeration
1839 )]
1840 #[repr(i32)]
1841 pub enum DnsLookupFamily {
1842 Auto = 0,
1843 V4Only = 1,
1844 V6Only = 2,
1845 V4Preferred = 3,
1846 All = 4,
1847 }
1848 impl DnsLookupFamily {
1849 /// String value of the enum field names used in the ProtoBuf definition.
1850 ///
1851 /// The values are not transformed in any way and thus are considered stable
1852 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1853 pub fn as_str_name(&self) -> &'static str {
1854 match self {
1855 Self::Auto => "AUTO",
1856 Self::V4Only => "V4_ONLY",
1857 Self::V6Only => "V6_ONLY",
1858 Self::V4Preferred => "V4_PREFERRED",
1859 Self::All => "ALL",
1860 }
1861 }
1862 /// Creates an enum from field names used in the ProtoBuf definition.
1863 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1864 match value {
1865 "AUTO" => Some(Self::Auto),
1866 "V4_ONLY" => Some(Self::V4Only),
1867 "V6_ONLY" => Some(Self::V6Only),
1868 "V4_PREFERRED" => Some(Self::V4Preferred),
1869 "ALL" => Some(Self::All),
1870 _ => None,
1871 }
1872 }
1873 }
1874 #[derive(
1875 Clone,
1876 Copy,
1877 Debug,
1878 PartialEq,
1879 Eq,
1880 Hash,
1881 PartialOrd,
1882 Ord,
1883 ::prost::Enumeration
1884 )]
1885 #[repr(i32)]
1886 pub enum ClusterProtocolSelection {
1887 /// Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2).
1888 /// If :ref:`http2_protocol_options <envoy_v3_api_field_config.cluster.v3.Cluster.http2_protocol_options>` are
1889 /// present, HTTP2 will be used, otherwise HTTP1.1 will be used.
1890 UseConfiguredProtocol = 0,
1891 /// Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection.
1892 UseDownstreamProtocol = 1,
1893 }
1894 impl ClusterProtocolSelection {
1895 /// String value of the enum field names used in the ProtoBuf definition.
1896 ///
1897 /// The values are not transformed in any way and thus are considered stable
1898 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1899 pub fn as_str_name(&self) -> &'static str {
1900 match self {
1901 Self::UseConfiguredProtocol => "USE_CONFIGURED_PROTOCOL",
1902 Self::UseDownstreamProtocol => "USE_DOWNSTREAM_PROTOCOL",
1903 }
1904 }
1905 /// Creates an enum from field names used in the ProtoBuf definition.
1906 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1907 match value {
1908 "USE_CONFIGURED_PROTOCOL" => Some(Self::UseConfiguredProtocol),
1909 "USE_DOWNSTREAM_PROTOCOL" => Some(Self::UseDownstreamProtocol),
1910 _ => None,
1911 }
1912 }
1913 }
1914 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1915 pub enum ClusterDiscoveryType {
1916 /// The :ref:`service discovery type <arch_overview_service_discovery_types>`
1917 /// to use for resolving the cluster.
1918 #[prost(enumeration = "DiscoveryType", tag = "2")]
1919 Type(i32),
1920 /// The custom cluster type.
1921 #[prost(message, tag = "38")]
1922 ClusterType(CustomClusterType),
1923 }
1924 ///
1925 /// Optional configuration for the load balancing algorithm selected by
1926 /// LbPolicy. Currently only
1927 /// : ref:`RING_HASH<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.RING_HASH>`,
1928 /// : ref:`MAGLEV<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.MAGLEV>` and
1929 /// : ref:`LEAST_REQUEST<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbPolicy.LEAST_REQUEST>`
1930 /// has additional configuration options.
1931 /// Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding
1932 /// LbPolicy will generate an error at runtime.
1933 #[derive(Clone, PartialEq, ::prost::Oneof)]
1934 pub enum LbConfig {
1935 /// Optional configuration for the Ring Hash load balancing policy.
1936 #[prost(message, tag = "23")]
1937 RingHashLbConfig(RingHashLbConfig),
1938 /// Optional configuration for the Maglev load balancing policy.
1939 #[prost(message, tag = "52")]
1940 MaglevLbConfig(MaglevLbConfig),
1941 /// Optional configuration for the Original Destination load balancing policy.
1942 #[prost(message, tag = "34")]
1943 OriginalDstLbConfig(OriginalDstLbConfig),
1944 /// Optional configuration for the LeastRequest load balancing policy.
1945 #[prost(message, tag = "37")]
1946 LeastRequestLbConfig(LeastRequestLbConfig),
1947 /// Optional configuration for the RoundRobin load balancing policy.
1948 #[prost(message, tag = "56")]
1949 RoundRobinLbConfig(RoundRobinLbConfig),
1950 }
1951}
1952/// Extensible load balancing policy configuration.
1953///
1954/// Every LB policy defined via this mechanism will be identified via a unique name using reverse
1955/// DNS notation. If the policy needs configuration parameters, it must define a message for its
1956/// own configuration, which will be stored in the config field. The name of the policy will tell
1957/// clients which type of message they should expect to see in the config field.
1958///
1959/// Note that there are cases where it is useful to be able to independently select LB policies
1960/// for choosing a locality and for choosing an endpoint within that locality. For example, a
1961/// given deployment may always use the same policy to choose the locality, but for choosing the
1962/// endpoint within the locality, some clusters may use weighted-round-robin, while others may
1963/// use some sort of session-based balancing.
1964///
1965/// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a
1966/// child LB policy for each locality. For each request, the parent chooses the locality and then
1967/// delegates to the child policy for that locality to choose the endpoint within the locality.
1968///
1969/// To facilitate this, the config message for the top-level LB policy may include a field of
1970/// type LoadBalancingPolicy that specifies the child policy.
1971#[derive(Clone, PartialEq, ::prost::Message)]
1972pub struct LoadBalancingPolicy {
1973 /// Each client will iterate over the list in order and stop at the first policy that it
1974 /// supports. This provides a mechanism for starting to use new LB policies that are not yet
1975 /// supported by all clients.
1976 #[prost(message, repeated, tag = "1")]
1977 pub policies: ::prost::alloc::vec::Vec<load_balancing_policy::Policy>,
1978}
1979/// Nested message and enum types in `LoadBalancingPolicy`.
1980pub mod load_balancing_policy {
1981 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1982 pub struct Policy {
1983 /// \[\#extension-category: envoy.load_balancing_policies\]
1984 #[prost(message, optional, tag = "4")]
1985 pub typed_extension_config: ::core::option::Option<
1986 super::super::super::core::v3::TypedExtensionConfig,
1987 >,
1988 }
1989}
1990#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1991pub struct UpstreamConnectionOptions {
1992 /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
1993 #[prost(message, optional, tag = "1")]
1994 pub tcp_keepalive: ::core::option::Option<super::super::core::v3::TcpKeepalive>,
1995 /// If enabled, associates the interface name of the local address with the upstream connection.
1996 /// This can be used by extensions during processing of requests. The association mechanism is
1997 /// implementation specific. Defaults to false due to performance concerns.
1998 #[prost(bool, tag = "2")]
1999 pub set_local_interface_name_on_upstream_connections: bool,
2000 /// Configurations for happy eyeballs algorithm.
2001 /// Add configs for first_address_family_version and first_address_family_count
2002 /// when sorting destination ip addresses.
2003 #[prost(message, optional, tag = "3")]
2004 pub happy_eyeballs_config: ::core::option::Option<
2005 upstream_connection_options::HappyEyeballsConfig,
2006 >,
2007}
2008/// Nested message and enum types in `UpstreamConnectionOptions`.
2009pub mod upstream_connection_options {
2010 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2011 pub struct HappyEyeballsConfig {
2012 /// Specify the IP address family to attempt connection first in happy
2013 /// eyeballs algorithm according to RFC8305#section-4.
2014 #[prost(enumeration = "FirstAddressFamilyVersion", tag = "1")]
2015 pub first_address_family_version: i32,
2016 /// Specify the number of addresses of the first_address_family_version being
2017 /// attempted for connection before the other address family.
2018 #[prost(message, optional, tag = "2")]
2019 pub first_address_family_count: ::core::option::Option<
2020 super::super::super::super::super::google::protobuf::UInt32Value,
2021 >,
2022 }
2023 #[derive(
2024 Clone,
2025 Copy,
2026 Debug,
2027 PartialEq,
2028 Eq,
2029 Hash,
2030 PartialOrd,
2031 Ord,
2032 ::prost::Enumeration
2033 )]
2034 #[repr(i32)]
2035 pub enum FirstAddressFamilyVersion {
2036 /// respect the native ranking of destination ip addresses returned from dns
2037 /// resolution
2038 Default = 0,
2039 V4 = 1,
2040 V6 = 2,
2041 }
2042 impl FirstAddressFamilyVersion {
2043 /// String value of the enum field names used in the ProtoBuf definition.
2044 ///
2045 /// The values are not transformed in any way and thus are considered stable
2046 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2047 pub fn as_str_name(&self) -> &'static str {
2048 match self {
2049 Self::Default => "DEFAULT",
2050 Self::V4 => "V4",
2051 Self::V6 => "V6",
2052 }
2053 }
2054 /// Creates an enum from field names used in the ProtoBuf definition.
2055 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2056 match value {
2057 "DEFAULT" => Some(Self::Default),
2058 "V4" => Some(Self::V4),
2059 "V6" => Some(Self::V6),
2060 _ => None,
2061 }
2062 }
2063 }
2064}
2065#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2066pub struct TrackClusterStats {
2067 /// If timeout_budgets is true, the :ref:`timeout budget histograms <config_cluster_manager_cluster_stats_timeout_budgets>` will be published for each
2068 /// request. These show what percentage of a request's per try and global timeout was used. A value
2069 /// of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value
2070 /// of 100 would indicate that the request took the entirety of the timeout given to it.
2071 #[prost(bool, tag = "1")]
2072 pub timeout_budgets: bool,
2073 /// If request_response_sizes is true, then the :ref:`histograms <config_cluster_manager_cluster_stats_request_response_sizes>` tracking header and body sizes
2074 /// of requests and responses will be published. Additionally, number of headers in the requests and responses will be tracked.
2075 #[prost(bool, tag = "2")]
2076 pub request_response_sizes: bool,
2077 /// If true, some stats will be emitted per-endpoint, similar to the stats in admin `/clusters`
2078 /// output.
2079 ///
2080 /// This does not currently output correct stats during a hot-restart.
2081 ///
2082 /// This is not currently implemented by all stat sinks.
2083 ///
2084 /// These stats do not honor filtering or tag extraction rules in :ref:`StatsConfig <envoy_v3_api_msg_config.metrics.v3.StatsConfig>` (but fixed-value tags are supported). Admin
2085 /// endpoint filtering is supported.
2086 ///
2087 ///
2088 /// This may not be used at the same time as
2089 /// : ref:`load_stats_config <envoy_v3_api_field_config.bootstrap.v3.ClusterManager.load_stats_config>`.
2090 #[prost(bool, tag = "3")]
2091 pub per_endpoint_stats: bool,
2092}