Consistent hashing to a subset of nodes. It works like consistent hash,
but instead of mapping to a single node, we map to a subset of nodes.
This commit is contained in:
parent
29118750be
commit
60b983503b
17 changed files with 434 additions and 17 deletions
|
|
@ -8,7 +8,7 @@ function _M.new(self, backend)
|
|||
local nodes = util.get_nodes(backend.endpoints)
|
||||
local o = {
|
||||
instance = self.factory:new(nodes),
|
||||
hash_by = backend["upstream-hash-by"],
|
||||
hash_by = backend["upstreamHashByConfig"]["upstream-hash-by"],
|
||||
traffic_shaping_policy = backend.trafficShapingPolicy,
|
||||
alternative_backends = backend.alternativeBackends,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue