.. _envoy_api_file_envoy/api/v2/cds.proto: Clusters ======== .. _envoy_api_msg_Cluster: Cluster ------- `[Cluster proto] `_ Configuration for a single upstream cluster. .. code-block:: json { "name": "...", "alt_stat_name": "...", "type": "...", "eds_cluster_config": "{...}", "connect_timeout": "{...}", "per_connection_buffer_limit_bytes": "{...}", "lb_policy": "...", "hosts": [], "health_checks": [], "max_requests_per_connection": "{...}", "circuit_breakers": "{...}", "tls_context": "{...}", "common_http_protocol_options": "{...}", "http_protocol_options": "{...}", "http2_protocol_options": "{...}", "dns_refresh_rate": "{...}", "dns_lookup_family": "...", "dns_resolvers": [], "outlier_detection": "{...}", "cleanup_interval": "{...}", "upstream_bind_config": "{...}", "lb_subset_config": "{...}", "ring_hash_lb_config": "{...}", "common_lb_config": "{...}", "transport_socket": "{...}", "metadata": "{...}", "protocol_selection": "..." } .. _envoy_api_field_Cluster.name: name (`string `_, *REQUIRED*) Supplies the name of the cluster which must be unique across all clusters. The cluster name is used when emitting :ref:`statistics ` if :ref:`alt_stat_name ` is not provided. Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. By default, the maximum length of a cluster name is limited to 60 characters. This limit can be increased by setting the :option:`--max-obj-name-len` command line argument to the desired value. .. _envoy_api_field_Cluster.alt_stat_name: alt_stat_name (`string `_) An optional alternative to the cluster name to be used while emitting stats. Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be confused with :ref:`Router Filter Header `. .. _envoy_api_field_Cluster.type: type (:ref:`Cluster.DiscoveryType `) The :ref:`service discovery type ` to use for resolving the cluster. .. _envoy_api_field_Cluster.eds_cluster_config: eds_cluster_config (:ref:`Cluster.EdsClusterConfig `) Configuration to use for EDS updates for the Cluster. .. _envoy_api_field_Cluster.connect_timeout: connect_timeout (`Duration `_) The timeout for new network connections to hosts in the cluster. .. _envoy_api_field_Cluster.per_connection_buffer_limit_bytes: per_connection_buffer_limit_bytes (`UInt32Value `_) Soft limit on size of the cluster’s connections read and write buffers. If unspecified, an implementation defined default is applied (1MiB). .. _envoy_api_field_Cluster.lb_policy: lb_policy (:ref:`Cluster.LbPolicy `) The :ref:`load balancer type ` to use when picking a host in the cluster. .. _envoy_api_field_Cluster.hosts: hosts (:ref:`core.Address `) If the service discovery type is :ref:`STATIC`, :ref:`STRICT_DNS` or :ref:`LOGICAL_DNS`, then hosts is required. .. _envoy_api_field_Cluster.health_checks: health_checks (:ref:`core.HealthCheck `) Optional :ref:`active health checking ` configuration for the cluster. If no configuration is specified no health checking will be done and all cluster members will be considered healthy at all times. .. _envoy_api_field_Cluster.max_requests_per_connection: max_requests_per_connection (`UInt32Value `_) Optional maximum requests for a single upstream connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 connection pool implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. .. _envoy_api_field_Cluster.circuit_breakers: circuit_breakers (:ref:`cluster.CircuitBreakers `) Optional :ref:`circuit breaking ` for the cluster. .. _envoy_api_field_Cluster.tls_context: tls_context (:ref:`auth.UpstreamTlsContext `) The TLS configuration for connections to the upstream cluster. If no TLS configuration is specified, TLS will not be used for new connections. .. attention:: Server certificate verification is not enabled by default. Configure :ref:`trusted_ca` to enable verification. .. _envoy_api_field_Cluster.common_http_protocol_options: common_http_protocol_options (:ref:`core.HttpProtocolOptions `) Additional options when handling HTTP requests. These options will be applicable to both HTTP1 and HTTP2 requests. .. _envoy_api_field_Cluster.http_protocol_options: http_protocol_options (:ref:`core.Http1ProtocolOptions `) Additional options when handling HTTP1 requests. .. _envoy_api_field_Cluster.http2_protocol_options: http2_protocol_options (:ref:`core.Http2ProtocolOptions `) Even if default HTTP2 protocol options are desired, this field must be set so that Envoy will assume that the upstream supports HTTP/2 when making new HTTP connection pool connections. Currently, Envoy only supports prior knowledge for upstream connections. Even if TLS is used with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 connections to happen over plain text. .. _envoy_api_field_Cluster.dns_refresh_rate: dns_refresh_rate (`Duration `_) If the DNS refresh rate is specified and the cluster type is either :ref:`STRICT_DNS`, or :ref:`LOGICAL_DNS`, this value is used as the cluster’s DNS refresh rate. If this setting is not specified, the value defaults to 5000. For cluster types other than :ref:`STRICT_DNS` and :ref:`LOGICAL_DNS` this setting is ignored. .. _envoy_api_field_Cluster.dns_lookup_family: dns_lookup_family (:ref:`Cluster.DnsLookupFamily `) The DNS IP address resolution policy. If this setting is not specified, the value defaults to :ref:`AUTO`. .. _envoy_api_field_Cluster.dns_resolvers: dns_resolvers (:ref:`core.Address `) If DNS resolvers are specified and the cluster type is either :ref:`STRICT_DNS`, or :ref:`LOGICAL_DNS`, this value is used to specify the cluster’s dns resolvers. If this setting is not specified, the value defaults to the default resolver, which uses /etc/resolv.conf for configuration. For cluster types other than :ref:`STRICT_DNS` and :ref:`LOGICAL_DNS` this setting is ignored. .. _envoy_api_field_Cluster.outlier_detection: outlier_detection (:ref:`cluster.OutlierDetection `) If specified, outlier detection will be enabled for this upstream cluster. Each of the configuration values can be overridden via :ref:`runtime values `. .. _envoy_api_field_Cluster.cleanup_interval: cleanup_interval (`Duration `_) The interval for removing stale hosts from a cluster type :ref:`ORIGINAL_DST`. Hosts are considered stale if they have not been used as upstream destinations during this interval. New hosts are added to original destination clusters on demand as new connections are redirected to Envoy, causing the number of hosts in the cluster to grow over time. Hosts that are not stale (they are actively used as destinations) are kept in the cluster, which allows connections to them remain open, saving the latency that would otherwise be spent on opening new connections. If this setting is not specified, the value defaults to 5000ms. For cluster types other than :ref:`ORIGINAL_DST` this setting is ignored. .. _envoy_api_field_Cluster.upstream_bind_config: upstream_bind_config (:ref:`core.BindConfig `) Optional configuration used to bind newly established upstream connections. This overrides any bind_config specified in the bootstrap proto. If the address and port are empty, no bind will be performed. .. _envoy_api_field_Cluster.lb_subset_config: lb_subset_config (:ref:`Cluster.LbSubsetConfig `) Configuration for load balancing subsetting. .. _envoy_api_field_Cluster.ring_hash_lb_config: ring_hash_lb_config (:ref:`Cluster.RingHashLbConfig `) Optional configuration for the Ring Hash load balancing policy. Only one of :ref:`ring_hash_lb_config ` may be set. .. _envoy_api_field_Cluster.common_lb_config: common_lb_config (:ref:`Cluster.CommonLbConfig `) Common configuration for all load balancer implementations. .. _envoy_api_field_Cluster.transport_socket: transport_socket (:ref:`core.TransportSocket `) Optional custom transport socket implementation to use for upstream connections. .. _envoy_api_field_Cluster.metadata: metadata (:ref:`core.Metadata `) The Metadata field can be used to provide additional information about the cluster. It can be used for stats, logging, and varying filter behavior. Fields should use reverse DNS notation to denote which entity within Envoy will need the information. For instance, if the metadata is intended for the Router filter, the filter name should be specified as *envoy.router*. .. _envoy_api_field_Cluster.protocol_selection: protocol_selection (:ref:`Cluster.ClusterProtocolSelection `) Determines how Envoy selects the protocol used to speak to upstream hosts. .. _envoy_api_msg_Cluster.EdsClusterConfig: Cluster.EdsClusterConfig ------------------------ `[Cluster.EdsClusterConfig proto] `_ Only valid when discovery type is EDS. .. code-block:: json { "eds_config": "{...}", "service_name": "..." } .. _envoy_api_field_Cluster.EdsClusterConfig.eds_config: eds_config (:ref:`core.ConfigSource `) Configuration for the source of EDS updates for this Cluster. .. _envoy_api_field_Cluster.EdsClusterConfig.service_name: service_name (`string `_) Optional alternative to cluster name to present to EDS. This does not have the same restrictions as cluster name, i.e. it may be arbitrary length. .. _envoy_api_msg_Cluster.LbSubsetConfig: Cluster.LbSubsetConfig ---------------------- `[Cluster.LbSubsetConfig proto] `_ Optionally divide the endpoints in this cluster into subsets defined by endpoint metadata and selected by route and weighted cluster metadata. .. code-block:: json { "fallback_policy": "...", "default_subset": "{...}", "subset_selectors": [] } .. _envoy_api_field_Cluster.LbSubsetConfig.fallback_policy: fallback_policy (:ref:`Cluster.LbSubsetConfig.LbSubsetFallbackPolicy `) The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK`. .. _envoy_api_field_Cluster.LbSubsetConfig.default_subset: default_subset (`Struct `_) Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK`. .. _envoy_api_field_Cluster.LbSubsetConfig.subset_selectors: subset_selectors (:ref:`Cluster.LbSubsetConfig.LbSubsetSelector `) For each entry, LbEndpoint.Metadata's *envoy.lb* namespace is traversed and a subset is created for each unique combination of key and value. For example: .. code-block:: json { "subset_selectors": [ { "keys": [ "version" ] }, { "keys": [ "stage", "hardware_type" ] } ]} A subset is matched when the metadata from the selected route and weighted cluster contains the same keys and values as the subset's metadata. The same host may appear in multiple subsets. .. _envoy_api_msg_Cluster.LbSubsetConfig.LbSubsetSelector: Cluster.LbSubsetConfig.LbSubsetSelector --------------------------------------- `[Cluster.LbSubsetConfig.LbSubsetSelector proto] `_ Specifications for subsets. .. code-block:: json { "keys": [] } .. _envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.keys: keys (`string `_) List of keys to match with the weighted cluster metadata. .. _envoy_api_enum_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy: Enum Cluster.LbSubsetConfig.LbSubsetFallbackPolicy -------------------------------------------------- `[Cluster.LbSubsetConfig.LbSubsetFallbackPolicy proto] `_ If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, any cluster endpoint may be returned (subject to policy, health checks, etc). If DEFAULT_SUBSET is selected, load balancing is performed over the endpoints matching the values from the default_subset field. .. _envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK: NO_FALLBACK *(DEFAULT)* ⁣ .. _envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.ANY_ENDPOINT: ANY_ENDPOINT ⁣ .. _envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET: DEFAULT_SUBSET ⁣ .. _envoy_api_msg_Cluster.RingHashLbConfig: Cluster.RingHashLbConfig ------------------------ `[Cluster.RingHashLbConfig proto] `_ Specific configuration for the :ref:`RingHash` load balancing policy. .. code-block:: json { "minimum_ring_size": "{...}" } .. _envoy_api_field_Cluster.RingHashLbConfig.minimum_ring_size: minimum_ring_size (`UInt64Value `_) Minimum hash ring size, i.e. total virtual nodes. A larger size will provide better request distribution since each host in the cluster will have more virtual nodes. Defaults to 1024. In the case that total number of hosts is greater than the minimum, each host will be allocated a single virtual node. .. _envoy_api_msg_Cluster.CommonLbConfig: Cluster.CommonLbConfig ---------------------- `[Cluster.CommonLbConfig proto] `_ Common configuration for all load balancer implementations. .. code-block:: json { "healthy_panic_threshold": "{...}" } .. _envoy_api_field_Cluster.CommonLbConfig.healthy_panic_threshold: healthy_panic_threshold (:ref:`type.Percent `) Configures the :ref:`healthy panic threshold `. If not specified, the default is 50%. .. note:: The specified percent will be truncated to the nearest 1%. .. _envoy_api_enum_Cluster.DiscoveryType: Enum Cluster.DiscoveryType -------------------------- `[Cluster.DiscoveryType proto] `_ Refer to :ref:`service discovery type ` for an explanation on each type. .. _envoy_api_enum_value_Cluster.DiscoveryType.STATIC: STATIC *(DEFAULT)* ⁣Refer to the :ref:`static discovery type` for an explanation. .. _envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS: STRICT_DNS ⁣Refer to the :ref:`strict DNS discovery type` for an explanation. .. _envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS: LOGICAL_DNS ⁣Refer to the :ref:`logical DNS discovery type` for an explanation. .. _envoy_api_enum_value_Cluster.DiscoveryType.EDS: EDS ⁣Refer to the :ref:`service discovery type` for an explanation. .. _envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST: ORIGINAL_DST ⁣Refer to the :ref:`original destination discovery type` for an explanation. .. _envoy_api_enum_Cluster.LbPolicy: Enum Cluster.LbPolicy --------------------- `[Cluster.LbPolicy proto] `_ Refer to :ref:`load balancer type ` architecture overview section for information on each type. .. _envoy_api_enum_value_Cluster.LbPolicy.ROUND_ROBIN: ROUND_ROBIN *(DEFAULT)* ⁣Refer to the :ref:`round robin load balancing policy` for an explanation. .. _envoy_api_enum_value_Cluster.LbPolicy.LEAST_REQUEST: LEAST_REQUEST ⁣Refer to the :ref:`least request load balancing policy` for an explanation. .. _envoy_api_enum_value_Cluster.LbPolicy.RING_HASH: RING_HASH ⁣Refer to the :ref:`ring hash load balancing policy` for an explanation. .. _envoy_api_enum_value_Cluster.LbPolicy.RANDOM: RANDOM ⁣Refer to the :ref:`random load balancing policy` for an explanation. .. _envoy_api_enum_value_Cluster.LbPolicy.ORIGINAL_DST_LB: ORIGINAL_DST_LB ⁣Refer to the :ref:`original destination load balancing policy` for an explanation. .. _envoy_api_enum_value_Cluster.LbPolicy.MAGLEV: MAGLEV ⁣Refer to the :ref:`Maglev load balancing policy` for an explanation. .. _envoy_api_enum_Cluster.DnsLookupFamily: Enum Cluster.DnsLookupFamily ---------------------------- `[Cluster.DnsLookupFamily proto] `_ When V4_ONLY is selected, the DNS resolver will only perform a lookup for addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will only perform a lookup for addresses in the IPv6 family. If AUTO is specified, the DNS resolver will first perform a lookup for addresses in the IPv6 family and fallback to a lookup for addresses in the IPv4 family. For cluster types other than :ref:`STRICT_DNS` and :ref:`LOGICAL_DNS`, this setting is ignored. .. _envoy_api_enum_value_Cluster.DnsLookupFamily.AUTO: AUTO *(DEFAULT)* ⁣ .. _envoy_api_enum_value_Cluster.DnsLookupFamily.V4_ONLY: V4_ONLY ⁣ .. _envoy_api_enum_value_Cluster.DnsLookupFamily.V6_ONLY: V6_ONLY ⁣ .. _envoy_api_enum_Cluster.ClusterProtocolSelection: Enum Cluster.ClusterProtocolSelection ------------------------------------- `[Cluster.ClusterProtocolSelection proto] `_ .. _envoy_api_enum_value_Cluster.ClusterProtocolSelection.USE_CONFIGURED_PROTOCOL: USE_CONFIGURED_PROTOCOL *(DEFAULT)* ⁣Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). If :ref:`http2_protocol_options ` are present, HTTP2 will be used, otherwise HTTP1.1 will be used. .. _envoy_api_enum_value_Cluster.ClusterProtocolSelection.USE_DOWNSTREAM_PROTOCOL: USE_DOWNSTREAM_PROTOCOL ⁣Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. .. _envoy_api_msg_UpstreamBindConfig: UpstreamBindConfig ------------------ `[UpstreamBindConfig proto] `_ An extensible structure containing the address Envoy should bind to when establishing upstream connections. .. code-block:: json { "source_address": "{...}" } .. _envoy_api_field_UpstreamBindConfig.source_address: source_address (:ref:`core.Address `) The address Envoy should bind to when establishing upstream connections.