xds: add config for random and maglev load balancer extensions (#23453)

* xds: add config for random and maglev load balancer extensions

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* update extension type to envoy.load_balancing_policies because envoy.clusters is extension type for custom cluster

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

Mirrored from https://github.com/envoyproxy/envoy @ e4352708f7991872159dd8db12d379d190da1e26
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent 5a16e6b631
commit 227f6dbe97
  1. 3
      envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto
  2. 9
      envoy/extensions/load_balancing_policies/maglev/v3/BUILD
  3. 29
      envoy/extensions/load_balancing_policies/maglev/v3/maglev.proto
  4. 9
      envoy/extensions/load_balancing_policies/random/v3/BUILD
  5. 21
      envoy/extensions/load_balancing_policies/random/v3/random.proto
  6. 3
      envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto
  7. 3
      envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto
  8. 2
      envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto
  9. 2
      versioning/BUILD

@ -17,11 +17,12 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/loa
option (udpa.annotations.file_status).package_version_status = ACTIVE; option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Least Request Load Balancing Policy] // [#protodoc-title: Least Request Load Balancing Policy]
// [#not-implemented-hide:]
// This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy // This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy
// extension point. See the :ref:`load balancing architecture overview // extension point. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` for more information. // <arch_overview_load_balancing_types>` for more information.
// [#extension: envoy.clusters.lb_policy] // [#extension: envoy.load_balancing_policies]
message LeastRequest { message LeastRequest {
// The number of random healthy hosts from which the host with the fewest active requests will // The number of random healthy hosts from which the host with the fewest active requests will
// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,29 @@
syntax = "proto3";
package envoy.extensions.load_balancing_policies.maglev.v3;
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.maglev.v3";
option java_outer_classname = "MaglevProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/maglev/v3;maglevv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Maglev Load Balancing Policy]
// [#not-implemented-hide:]
// This configuration allows the built-in Maglev LB policy to be configured via the LB policy
// extension point. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` and :ref:`Maglev<arch_overview_load_balancing_types_maglev>` for more information.
// [#extension: envoy.load_balancing_policies]
message Maglev {
// The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee.
// Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same
// upstream as it was before. Increasing the table size reduces the amount of disruption.
// The table size must be prime number limited to 5000011. If it is not specified, the default is 65537.
google.protobuf.UInt64Value table_size = 1 [(validate.rules).uint64 = {lte: 5000011}];
}

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,21 @@
syntax = "proto3";
package envoy.extensions.load_balancing_policies.random.v3;
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.random.v3";
option java_outer_classname = "RandomProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/random/v3;randomv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Random Load Balancing Policy]
// [#not-implemented-hide:]
// This configuration allows the built-in Random LB policy to be configured via the LB policy
// extension point. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` for more information.
// [#extension: envoy.load_balancing_policies]
message Random {
}

@ -14,11 +14,12 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/loa
option (udpa.annotations.file_status).package_version_status = ACTIVE; option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Ring Hash Load Balancing Policy] // [#protodoc-title: Ring Hash Load Balancing Policy]
// [#not-implemented-hide:]
// This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy // This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy
// extension point. See the :ref:`load balancing architecture overview // extension point. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` for more information. // <arch_overview_load_balancing_types>` for more information.
// [#extension: envoy.clusters.lb_policy] // [#extension: envoy.load_balancing_policies]
// [#next-free-field: 6] // [#next-free-field: 6]
message RingHash { message RingHash {
// The hash function used to hash hosts onto the ketama ring. // The hash function used to hash hosts onto the ketama ring.

@ -13,11 +13,12 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/loa
option (udpa.annotations.file_status).package_version_status = ACTIVE; option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Round Robin Load Balancing Policy] // [#protodoc-title: Round Robin Load Balancing Policy]
// [#not-implemented-hide:]
// This configuration allows the built-in ROUND_ROBIN LB policy to be configured via the LB policy // This configuration allows the built-in ROUND_ROBIN LB policy to be configured via the LB policy
// extension point. See the :ref:`load balancing architecture overview // extension point. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` for more information. // <arch_overview_load_balancing_types>` for more information.
// [#extension: envoy.clusters.lb_policy] // [#extension: envoy.load_balancing_policies]
message RoundRobin { message RoundRobin {
// Configuration for slow start mode. // Configuration for slow start mode.
// If this configuration is not set, slow start will not be not enabled. // If this configuration is not set, slow start will not be not enabled.

@ -17,7 +17,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview // Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview
// <arch_overview_load_balancing_types>` for more information. // <arch_overview_load_balancing_types>` for more information.
// [#extension: envoy.clusters.lb_policy] // [#extension: envoy.load_balancing_policies]
message WrrLocality { message WrrLocality {
// The child LB policy to create for endpoint-picking within the chosen locality. // The child LB policy to create for endpoint-picking within the chosen locality.
config.cluster.v3.LoadBalancingPolicy endpoint_picking_policy = 1 config.cluster.v3.LoadBalancingPolicy endpoint_picking_policy = 1

@ -177,6 +177,8 @@ proto_library(
"//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg", "//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg",
"//envoy/extensions/key_value/file_based/v3:pkg", "//envoy/extensions/key_value/file_based/v3:pkg",
"//envoy/extensions/load_balancing_policies/least_request/v3:pkg", "//envoy/extensions/load_balancing_policies/least_request/v3:pkg",
"//envoy/extensions/load_balancing_policies/maglev/v3:pkg",
"//envoy/extensions/load_balancing_policies/random/v3:pkg",
"//envoy/extensions/load_balancing_policies/ring_hash/v3:pkg", "//envoy/extensions/load_balancing_policies/ring_hash/v3:pkg",
"//envoy/extensions/load_balancing_policies/round_robin/v3:pkg", "//envoy/extensions/load_balancing_policies/round_robin/v3:pkg",
"//envoy/extensions/load_balancing_policies/wrr_locality/v3:pkg", "//envoy/extensions/load_balancing_policies/wrr_locality/v3:pkg",

Loading…
Cancel
Save