redis_cluster.proto 3.9 KB

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