Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
feat(balancer) new consistent hashing algorithm
Browse files Browse the repository at this point in the history
A new consistent hashing algorithm was added. It should not rely on
the order of adding and removing addresses to always build the same
balancing strategy.
  • Loading branch information
locao committed Sep 28, 2020
1 parent 794dc55 commit 8d3246e
Show file tree
Hide file tree
Showing 3 changed files with 1,296 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua-resty-dns-client-5.0.1-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies = {
"lrandom",
"lua-resty-timer < 1.0",
"binaryheap >= 0.4",
"luaxxhash >= 1.0",
}
build = {
type = "builtin",
Expand All @@ -30,5 +31,6 @@ build = {
["resty.dns.balancer.ring"] = "src/resty/dns/balancer/ring.lua",
["resty.dns.balancer.least_connections"] = "src/resty/dns/balancer/least_connections.lua",
["resty.dns.balancer.handle"] = "src/resty/dns/balancer/handle.lua",
["resty.dns.balancer.consistent_hashing"] = "src/resty/dns/balancer/consistent_hashing.lua",
},
}

0 comments on commit 8d3246e

Please sign in to comment.