You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aacca7e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(loadbalancer): track inflight for shortestResponse (#7973) (#7987)
* fix(loadbalancer): track inflight for shortestResponse (#7973)
ShortestResponse increments inflight when an upstream is selected, and
Divide releases that count once on success, error, or cancellation
without going negative. A historically fast upstream no longer keeps
every request while its queue grows.
Fixes#7973
* fix(loadbalancer): release shortestResponse inflight on retry
Failover re-selects the standby through the load balancer, which increments
its inflight. With a Divide attempt owner, that reservation moves to the
standby and is released with the attempt: immediately on failure, or when
the response body finishes on success. Without an owner, the retry completion
releases the standby once, the same way P2C does.
* fix(websocket): release shortestResponse inflight with the session
Selection already reserved the upstream. Release that reservation when the
session ends, or when the handshake finishes without starting a session.
Copy file name to clipboardExpand all lines: shenyu-loadbalancer/src/test/java/org/apache/shenyu/loadbalancer/spi/ShortestResponseLoadBalancerTest.java
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -84,4 +84,38 @@ public void testSelectByResponse() {
Copy file name to clipboardExpand all lines: shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/DefaultRetryStrategy.java
Copy file name to clipboardExpand all lines: shenyu-plugin/shenyu-plugin-httpclient/src/test/java/org/apache/shenyu/plugin/httpclient/RetryStrategyTest.java
Copy file name to clipboardExpand all lines: shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-divide/src/main/java/org/apache/shenyu/plugin/divide/DividePlugin.java
Copy file name to clipboardExpand all lines: shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-divide/src/test/java/org/apache/shenyu/plugin/divide/DividePluginTest.java
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -479,6 +479,43 @@ public void leastActiveInflightShouldBeReleasedOnCancellation() {
0 commit comments