-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE #4469]add shortestResponseLoadBalancer #4488
[ISSUE #4469]add shortestResponseLoadBalancer #4488
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4488 +/- ##
============================================
- Coverage 68.11% 68.03% -0.08%
- Complexity 7549 7561 +12
============================================
Files 1027 1028 +1
Lines 29266 29370 +104
Branches 2635 2652 +17
============================================
+ Hits 19934 19982 +48
- Misses 7755 7804 +49
- Partials 1577 1584 +7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -110,8 +114,15 @@ protected Mono<Void> doExecute(final ServerWebExchange exchange, final ShenyuPlu | |||
exchange.getAttributes().put(Constants.RETRY_STRATEGY, StringUtils.defaultString(ruleHandle.getRetryStrategy(), RetryEnum.CURRENT.getName())); | |||
exchange.getAttributes().put(Constants.LOAD_BALANCE, StringUtils.defaultString(ruleHandle.getLoadBalance(), LoadBalanceEnum.RANDOM.getName())); | |||
exchange.getAttributes().put(Constants.DIVIDE_SELECTOR_ID, selector.getId()); | |||
return ruleHandle.getLoadBalance().equals(P2C) ? chain.execute(exchange).doOnSuccess(e -> responseTrigger(upstream | |||
)).doOnError(throwable -> responseTrigger(upstream)) : chain.execute(exchange); | |||
if (ruleHandle.getLoadBalance().equals(P2C)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats mean ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Different strategies require different methods to be implemented.Does it need improvement?
#4469
add shortestResponseLoadBalancer