Directories
¶
Path | Synopsis |
---|---|
Package chash provides consistent hash balancing "Consistent hashing can guarantee that when a cache machine is removed, only the objects cached in it will be rehashed; when a new cache machine is added, only a fairly few objects will be rehashed." https://www.codeproject.com/Articles/56138/Consistent-hashing consistent hashing with bounded loads https://research.googleblog.com/2017/04/consistent-hashing-with-bounded-loads.html
|
Package chash provides consistent hash balancing "Consistent hashing can guarantee that when a cache machine is removed, only the objects cached in it will be rehashed; when a new cache machine is added, only a fairly few objects will be rehashed." https://www.codeproject.com/Articles/56138/Consistent-hashing consistent hashing with bounded loads https://research.googleblog.com/2017/04/consistent-hashing-with-bounded-loads.html |
cmd
|
|
Package controller provides REST API to configure balancer controller API - Authentication Basic HTTP Auth - Stats GET http://{controller_address}/stats - List All LB instance GET http://{controller_address}/vs - Add LB instance POST http://{controller_address}/vs Body {"name":"redis","address":"127.0.0.1:6379"} Example: curl -XPOST -u admin:admin -H 'content-type: application/json' -d '{"name":"redis","address":"127.0.0.1:6379"}' http://127.0.0.1:6587/vs - Enable LB instance POST http://{controller_address}/vs/{name} Body {"action":"enable"} - Disable LB instance POST http://{controller_address}/vs/{name} Body {"action":"disable"} - List pool member of LB instance GET http://{controller_address}/vs/{name} - Add pool member to LB instance POST http://{controller_address}/vs/{name}/pool Body: {"address":"127.0.0.1:10003","weight":2} Example: curl -XPOST -u admin:admin -H 'content-type: application/json' -d '{"address":"127.0.0.1:10003"}' http://127.0.0.1:6587/vs/web/pool - Remove pool member from LB instance DELETE http://{controller_address}/vs/{name}/pool Body: {"address":"127.0.0.1:10002"} Example: curl -XDELETE -u admin:admin -H 'content-type: application/json' -d '{"address":"127.0.0.1:10002"}' http://127.0.0.1:6587/vs/web/pool
|
Package controller provides REST API to configure balancer controller API - Authentication Basic HTTP Auth - Stats GET http://{controller_address}/stats - List All LB instance GET http://{controller_address}/vs - Add LB instance POST http://{controller_address}/vs Body {"name":"redis","address":"127.0.0.1:6379"} Example: curl -XPOST -u admin:admin -H 'content-type: application/json' -d '{"name":"redis","address":"127.0.0.1:6379"}' http://127.0.0.1:6587/vs - Enable LB instance POST http://{controller_address}/vs/{name} Body {"action":"enable"} - Disable LB instance POST http://{controller_address}/vs/{name} Body {"action":"disable"} - List pool member of LB instance GET http://{controller_address}/vs/{name} - Add pool member to LB instance POST http://{controller_address}/vs/{name}/pool Body: {"address":"127.0.0.1:10003","weight":2} Example: curl -XPOST -u admin:admin -H 'content-type: application/json' -d '{"address":"127.0.0.1:10003"}' http://127.0.0.1:6587/vs/web/pool - Remove pool member from LB instance DELETE http://{controller_address}/vs/{name}/pool Body: {"address":"127.0.0.1:10002"} Example: curl -XDELETE -u admin:admin -H 'content-type: application/json' -d '{"address":"127.0.0.1:10002"}' http://127.0.0.1:6587/vs/web/pool |
examples
|
|
Package roundrobin provides smooth weighted round-robin balancing > For edge case weights like { 5, 1, 1 } we now produce { a, a, b, a, c, a, a } > sequence instead of { c, b, a, a, a, a, a } produced previously.
|
Package roundrobin provides smooth weighted round-robin balancing > For edge case weights like { 5, 1, 1 } we now produce { a, a, b, a, c, a, a } > sequence instead of { c, b, a, a, a, a, a } produced previously. |
Click to show internal directories.
Click to hide internal directories.