load balancer: update related methods for load balancer extensions#23474
load balancer: update related methods for load balancer extensions#23474wrowe merged 4 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
|
|
||
| /** | ||
| * @return LoadBalancerPtr a new worker local load balancer. | ||
| */ | ||
| virtual LoadBalancerPtr create(LoadBalancerParams params) PURE; |
There was a problem hiding this comment.
Why this is necessary?
If the load_balancing_policy is enabled, all Lb type will be treated as ThreadAwareLoadBalancer. But for Lb type like least request, thread local priority_set and local_priority_set are necessary. So, we must add this params to help the factory to create these types of Lb.
| */ | ||
| virtual const envoy::config::cluster::v3::LoadBalancingPolicy_Policy& | ||
| loadBalancingPolicy() const PURE; | ||
| virtual const ProtobufTypes::MessagePtr& loadBalancingPolicy() const PURE; | ||
|
|
There was a problem hiding this comment.
Why we need this change?
Load balancer will be created at runtime in every worker. We shouldn't use non-validated raw Policy to create load balancers. Uncaught exceptions may be throwed.
So, we should unpack and validate this typed config in the configure phase.
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
Hmmm, the ci take too much time run the coverage tests. Seems that the miss-rate of remote cache is very high because I update the Anyway, this PR shouldn't be merged before 1.24.0 release. /wait |
…oad-balancer-policy-base-api
|
/retest |
|
Retrying Azure Pipelines: |
…oad-balancer-policy-base-api
|
/retest |
|
Retrying Azure Pipelines: |
Commit Message: load balancer: update related methods for load balancer extensions
Additional Description:
Part of work to land #20634. This is split out from #23472 and is some necessary pre-work for adding load balancer extension.
I made this as an independent PR because this updates some core code and I wish this could be reviewed separately.
Risk Level: mid.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.