nanamikon commented on issue #7301:
URL: https://github.com/apache/apisix/issues/7301#issuecomment-1163213414

   Refer to least_conn.lua
   ```
   get = function (ctx)
               .......
               info.score = info.score + info.effect_weight
               servers_heap:update(server, info)
               return server
           end
   ```
   
   ```
           after_balance = function (ctx, before_retry)
               local server = ctx.balancer_server
               local info = servers_heap:valueByPayload(server)
               info.score = info.score - info.effect_weight
               servers_heap:update(server, info)
   ......
   ```
   
   I found that the counter will add after picking,   and  reduce in the log 
phase,  so this will work only for the
    http request of upgrade。  After ws upgrade,  apisix will not kown how many 
active tcp connections now
   
   In the product env,  we find least_conn fall back to rr through our monitor 
dashboard。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to