endpoint.proto 5.2 KB

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