Skip to content

Commit

Permalink
perf(round_robin) ring balancer with no hashing feats (#123)
Browse files Browse the repository at this point in the history
* perf(round_robin) ring balancer with no hashing feats

This commit adds a round-robin algorithm with the same features as the
previous ring algorithm, but with no consistent-hashing support.

* tests(*) tests matching the new algorithms

* fix(round_robin) reduce the number of intermediate tables

* perf(round_robin) use ipairs

* perf(round_robin) shuffle the wheel after adding addresses
  • Loading branch information
locao authored Apr 2, 2021
1 parent 23ee764 commit 4ea417e
Show file tree
Hide file tree
Showing 6 changed files with 688 additions and 1,345 deletions.
4 changes: 2 additions & 2 deletions lua-resty-dns-client-5.2.3-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ build = {
["resty.dns.utils"] = "src/resty/dns/utils.lua",
["resty.dns.client"] = "src/resty/dns/client.lua",
["resty.dns.balancer.base"] = "src/resty/dns/balancer/base.lua",
["resty.dns.balancer.ring"] = "src/resty/dns/balancer/ring.lua",
["resty.dns.balancer.consistent_hashing"] = "src/resty/dns/balancer/consistent_hashing.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",
["resty.dns.balancer.round_robin"] = "src/resty/dns/balancer/round_robin.lua",
},
}
Loading

0 comments on commit 4ea417e

Please sign in to comment.