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/05/15 12:36:17 UTC

[GitHub] [apisix] spacewander commented on issue #7042: bug: Obvious memory leak when the weight sum of all nodes in the upstream of the chash type is large

spacewander commented on issue #7042:
URL: https://github.com/apache/apisix/issues/7042#issuecomment-1126930010

   > Why in version 2.X, the lrucache key uses the upstream address?
   
   It is because we add upstream discovery so the same upstream id may have different upstream addresses.
   
   Some solutions to this problem (sorted by my favorite):
   1. dividing the weight by a GCD before using it. Hoping the weights are not prime.
   2. use a different chash algorithm, like Nginx's / Maglev / AnchorHash 
   3. don't use LRU for the upstream objects. This requires refactor at high risk.


-- 
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