dns: enable dns failure refresh rate configuration (#8226)

This adds a new dns_failure_refresh_rate configuration to the Cluster type to allow the configuration of the DNS refresh rate during failures (empty responses).

Risk Level: Low
Testing: Updated tests
Docs Changes: Updated docs
Release Notes: Added an entry describing the change

Fixes #7367

Signed-off-by: Venil Noronha <veniln@vmware.com>

Mirrored from https://github.com/envoyproxy/envoy @ 153bf8251be76e5eba8b04f2aeeb5d7a3a490690
pull/620/head
data-plane-api(CircleCI) 5 years ago
parent 4dc95d4bce
commit fc4a9648d9
  1. 31
      envoy/api/v2/cds.proto
  2. 31
      envoy/api/v3alpha/cds.proto

@ -47,7 +47,7 @@ service ClusterDiscoveryService {
}
// Configuration for a single upstream cluster.
// [#comment:next free field: 44]
// [#comment:next free field: 45]
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
@ -436,6 +436,22 @@ message Cluster {
bool close_connections_on_host_set_change = 6;
}
message RefreshRate {
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval <envoy_api_field_Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];
// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>` if set. The default
// is 10 times the :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}
reserved 12, 15;
// Configuration to use different transport sockets for different endpoints.
@ -614,6 +630,19 @@ message Cluster {
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16 [(validate.rules).duration = {gt {}}];
// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the clusters DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;
// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.

@ -47,7 +47,7 @@ service ClusterDiscoveryService {
}
// Configuration for a single upstream cluster.
// [#comment:next free field: 44]
// [#comment:next free field: 45]
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
@ -430,6 +430,22 @@ message Cluster {
bool close_connections_on_host_set_change = 6;
}
message RefreshRate {
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval <envoy_api_field_Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];
// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>` if set. The default
// is 10 times the :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}
reserved 12, 15;
// Configuration to use different transport sockets for different endpoints.
@ -608,6 +624,19 @@ message Cluster {
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16 [(validate.rules).duration = {gt {}}];
// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the clusters DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;
// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.

Loading…
Cancel
Save