endpoint.proto 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. syntax = "proto3";
  2. package envoy.config.endpoint.v3;
  3. import "envoy/config/endpoint/v3/endpoint_components.proto";
  4. import "envoy/type/v3/percent.proto";
  5. import "google/protobuf/duration.proto";
  6. import "google/protobuf/wrappers.proto";
  7. import "udpa/annotations/status.proto";
  8. import "udpa/annotations/versioning.proto";
  9. import "validate/validate.proto";
  10. option java_package = "io.envoyproxy.envoy.config.endpoint.v3";
  11. option java_outer_classname = "EndpointProto";
  12. option java_multiple_files = true;
  13. option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3";
  14. option (udpa.annotations.file_status).package_version_status = ACTIVE;
  15. // [#protodoc-title: Endpoint configuration]
  16. // Endpoint discovery :ref:`architecture overview <arch_overview_service_discovery_types_eds>`
  17. // Each route from RDS will map to a single cluster or traffic split across
  18. // clusters using weights expressed in the RDS WeightedCluster.
  19. //
  20. // With EDS, each cluster is treated independently from a LB perspective, with
  21. // LB taking place between the Localities within a cluster and at a finer
  22. // granularity between the hosts within a locality. The percentage of traffic
  23. // for each endpoint is determined by both its load_balancing_weight, and the
  24. // load_balancing_weight of its locality. First, a locality will be selected,
  25. // then an endpoint within that locality will be chose based on its weight.
  26. // [#next-free-field: 6]
  27. message ClusterLoadAssignment {
  28. option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.ClusterLoadAssignment";
  29. // Load balancing policy settings.
  30. // [#next-free-field: 6]
  31. message Policy {
  32. option (udpa.annotations.versioning).previous_message_type =
  33. "envoy.api.v2.ClusterLoadAssignment.Policy";
  34. // [#not-implemented-hide:]
  35. message DropOverload {
  36. option (udpa.annotations.versioning).previous_message_type =
  37. "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload";
  38. // Identifier for the policy specifying the drop.
  39. string category = 1 [(validate.rules).string = {min_len: 1}];
  40. // Percentage of traffic that should be dropped for the category.
  41. type.v3.FractionalPercent drop_percentage = 2;
  42. }
  43. reserved 1, 5;
  44. reserved "disable_overprovisioning";
  45. // Action to trim the overall incoming traffic to protect the upstream
  46. // hosts. This action allows protection in case the hosts are unable to
  47. // recover from an outage, or unable to autoscale or unable to handle
  48. // incoming traffic volume for any reason.
  49. //
  50. // At the client each category is applied one after the other to generate
  51. // the 'actual' drop percentage on all outgoing traffic. For example:
  52. //
  53. // .. code-block:: json
  54. //
  55. // { "drop_overloads": [
  56. // { "category": "throttle", "drop_percentage": 60 }
  57. // { "category": "lb", "drop_percentage": 50 }
  58. // ]}
  59. //
  60. // The actual drop percentages applied to the traffic at the clients will be
  61. // "throttle"_drop = 60%
  62. // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
  63. // actual_outgoing_load = 20% // remaining after applying all categories.
  64. // [#not-implemented-hide:]
  65. repeated DropOverload drop_overloads = 2;
  66. // Priority levels and localities are considered overprovisioned with this
  67. // factor (in percentage). This means that we don't consider a priority
  68. // level or locality unhealthy until the fraction of healthy hosts
  69. // multiplied by the overprovisioning factor drops below 100.
  70. // With the default value 140(1.4), Envoy doesn't consider a priority level
  71. // or a locality unhealthy until their percentage of healthy hosts drops
  72. // below 72%. For example:
  73. //
  74. // .. code-block:: json
  75. //
  76. // { "overprovisioning_factor": 100 }
  77. //
  78. // Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
  79. // :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
  80. google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}];
  81. // The max time until which the endpoints from this assignment can be used.
  82. // If no new assignments are received before this time expires the endpoints
  83. // are considered stale and should be marked unhealthy.
  84. // Defaults to 0 which means endpoints never go stale.
  85. google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}];
  86. }
  87. // Name of the cluster. This will be the :ref:`service_name
  88. // <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
  89. // in the cluster :ref:`EdsClusterConfig
  90. // <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
  91. string cluster_name = 1 [(validate.rules).string = {min_len: 1}];
  92. // List of endpoints to load balance to.
  93. repeated LocalityLbEndpoints endpoints = 2;
  94. // Map of named endpoints that can be referenced in LocalityLbEndpoints.
  95. // [#not-implemented-hide:]
  96. map<string, Endpoint> named_endpoints = 5;
  97. // Load balancing policy settings.
  98. Policy policy = 4;
  99. }