load balancer: added maglev/ring hash load balancer extension (#24896)

* load balancer: added maglev/ring hash load balancer extension

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

* fix the possbile UH of ringhash/maglev when locality_weighted_lb_config is set or LoadBalancingPolicyConfig is used

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

* minor update

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

* remove uncessary stdout

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

* enable locality weighted lb only when he configuration is set eexplicitly

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

* fix format

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

* add more test

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

* fix windows build

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

* resolve cconflict

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

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

Mirrored from https://github.com/envoyproxy/envoy @ 5ba835d8ce9ff1d92b85a391f0138f9a69a71083
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent d7e17e6820
commit 8664235f83
  1. 5
      envoy/extensions/load_balancing_policies/maglev/v3/maglev.proto
  2. 7
      envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto

@ -16,7 +16,7 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/loa
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Maglev Load Balancing Policy]
// [#not-implemented-hide:]
// [#extension: envoy.load_balancing_policies.maglev]
// 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
@ -30,4 +30,7 @@ message Maglev {
// Common configuration for hashing-based load balancing policies.
common.v3.ConsistentHashingLbConfig consistent_hashing_lb_config = 2;
// Enable locality weighted load balancing for maglev lb explicitly.
common.v3.LocalityLbConfig.LocalityWeightedLbConfig locality_weighted_lb_config = 3;
}

@ -17,12 +17,12 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/loa
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Ring Hash Load Balancing Policy]
// [#not-implemented-hide:]
// [#extension: envoy.load_balancing_policies.ring_hash]
// 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
// <arch_overview_load_balancing_types>` for more information.
// [#next-free-field: 7]
// [#next-free-field: 8]
message RingHash {
// The hash function used to hash hosts onto the ketama ring.
enum HashFunction {
@ -90,4 +90,7 @@ message RingHash {
// Common configuration for hashing-based load balancing policies.
common.v3.ConsistentHashingLbConfig consistent_hashing_lb_config = 6;
// Enable locality weighted load balancing for ring hash lb explicitly.
common.v3.LocalityLbConfig.LocalityWeightedLbConfig locality_weighted_lb_config = 7;
}

Loading…
Cancel
Save