redis_cluster.proto 3.7 KB

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