You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/22 14:55:25 UTC

[GitHub] [apisix] nanamikon commented on issue #7301: help request: Load rebalance about websocket

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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org