...

Text file src/github.com/datawire/ambassador/v2/api/envoy/config/cluster/redis/redis_cluster.proto

Documentation: github.com/datawire/ambassador/v2/api/envoy/config/cluster/redis

     1syntax = "proto3";
     2
     3package envoy.config.cluster.redis;
     4
     5import "google/protobuf/duration.proto";
     6import "google/protobuf/wrappers.proto";
     7
     8import "udpa/annotations/status.proto";
     9import "validate/validate.proto";
    10
    11option java_package = "io.envoyproxy.envoy.config.cluster.redis";
    12option java_outer_classname = "RedisClusterProto";
    13option java_multiple_files = true;
    14option (udpa.annotations.file_status).package_version_status = FROZEN;
    15
    16// [#protodoc-title: Redis Cluster Configuration]
    17// This cluster adds support for `Redis Cluster <https://redis.io/topics/cluster-spec>`_, as part
    18// of :ref:`Envoy's support for Redis Cluster <arch_overview_redis>`.
    19//
    20// Redis Cluster is an extension of Redis which supports sharding and high availability (where a
    21// shard that loses its primary fails over to a replica, and designates it as the new primary).
    22// However, as there is no unified frontend or proxy service in front of Redis Cluster, the client
    23// (in this case Envoy) must locally maintain the state of the Redis Cluster, specifically the
    24// topology. A random node in the cluster is queried for the topology using the `CLUSTER SLOTS
    25// command <https://redis.io/commands/cluster-slots>`_. This result is then stored locally, and
    26// updated at user-configured intervals.
    27//
    28// Additionally, if
    29// :ref:`enable_redirection<envoy_api_field_config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings.enable_redirection>`
    30// is true, then moved and ask redirection errors from upstream servers will trigger a topology
    31// refresh when they exceed a user-configured error threshold.
    32//
    33// Example:
    34//
    35// .. code-block:: yaml
    36//
    37//     name: name
    38//     connect_timeout: 0.25s
    39//     dns_lookup_family: V4_ONLY
    40//     hosts:
    41//     - socket_address:
    42//       address: foo.bar.com
    43//       port_value: 22120
    44//     cluster_type:
    45//     name: envoy.clusters.redis
    46//     typed_config:
    47//       "@type": type.googleapis.com/google.protobuf.Struct
    48//       value:
    49//         cluster_refresh_rate: 30s
    50//         cluster_refresh_timeout: 0.5s
    51//         redirect_refresh_interval: 10s
    52//         redirect_refresh_threshold: 10
    53// [#extension: envoy.clusters.redis]
    54
    55// [#next-free-field: 7]
    56message RedisClusterConfig {
    57  // Interval between successive topology refresh requests. If not set, this defaults to 5s.
    58  google.protobuf.Duration cluster_refresh_rate = 1 [(validate.rules).duration = {gt {}}];
    59
    60  // Timeout for topology refresh request. If not set, this defaults to 3s.
    61  google.protobuf.Duration cluster_refresh_timeout = 2 [(validate.rules).duration = {gt {}}];
    62
    63  // The minimum interval that must pass after triggering a topology refresh request before a new
    64  // request can possibly be triggered again. Any errors received during one of these
    65  // time intervals are ignored. If not set, this defaults to 5s.
    66  google.protobuf.Duration redirect_refresh_interval = 3;
    67
    68  // The number of redirection errors that must be received before
    69  // triggering a topology refresh request. If not set, this defaults to 5.
    70  // If this is set to 0, topology refresh after redirect is disabled.
    71  google.protobuf.UInt32Value redirect_refresh_threshold = 4;
    72
    73  // The number of failures that must be received before triggering a topology refresh request.
    74  // If not set, this defaults to 0, which disables the topology refresh due to failure.
    75  uint32 failure_refresh_threshold = 5;
    76
    77  // The number of hosts became degraded or unhealthy before triggering a topology refresh request.
    78  // If not set, this defaults to 0, which disables the topology refresh due to degraded or
    79  // unhealthy host.
    80  uint32 host_degraded_refresh_threshold = 6;
    81}

View as plain text