{"id":16920576,"url":"https://github.com/arriqaaq/xring","last_synced_at":"2025-03-22T11:30:50.654Z","repository":{"id":98675711,"uuid":"146543374","full_name":"arriqaaq/xring","owner":"arriqaaq","description":"An implementation of Consistent Hashing with Bounded Loads (using Red-Black tree)","archived":false,"fork":false,"pushed_at":"2019-06-15T06:21:37.000Z","size":11,"stargazers_count":49,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T10:51:28.441Z","etag":null,"topics":["bounded-load","consistent-hashing","consistent-hashing-library","go","golang","redblacktree"],"latest_commit_sha":null,"homepage":"https://medium.com/techlog/consistent-hashing-with-bounded-loads-using-a-red-black-tree-b5aaf0d8540f","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arriqaaq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-29T04:06:46.000Z","updated_at":"2025-02-23T06:31:23.000Z","dependencies_parsed_at":"2023-05-14T22:00:38.472Z","dependency_job_id":null,"html_url":"https://github.com/arriqaaq/xring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fxring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fxring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fxring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fxring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arriqaaq","download_url":"https://codeload.github.com/arriqaaq/xring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244951143,"owners_count":20537325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bounded-load","consistent-hashing","consistent-hashing-library","go","golang","redblacktree"],"created_at":"2024-10-13T19:48:48.961Z","updated_at":"2025-03-22T11:30:50.369Z","avatar_url":"https://github.com/arriqaaq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xring\nA consistent hash ring with bounded loads\nConsistent hashing with bounded loads implementation using Red Black Tree \n![xring](https://3.bp.blogspot.com/-pgZ4b9H7VlM/WOJ91rDe_XI/AAAAAAAABqw/wIjtyPHheFgyHpXIqY4qNLhd_H9DnHsXACLcB/s640/image00.png)\n\n## Example Usage\n\n```go\n\tnodes := []string{\"a\", \"b\", \"c\"}\n\tcnf := \u0026xring.Config{\n\t\tVirtualNodes: 300,\n\t\tLoadFactor:   2,\n\t}\n\thashRing := xring.NewRing(nodes, cnf)\n\tnode,err:=hashRing.Get(\"foo\")\n\n\t/*  \n\t\tCall this post execution of any function, else \n\t \tthe traffic would be load balanced, and get stuck if\n\t\tall nodes are busy \n\t*/\n\thashRing.Done(node)\n```\n\n\n## TODO\n\n- Add more test cases\n- Performance test for xxhash\n\n## Paper\nhttps://ai.googleblog.com/2017/04/consistent-hashing-with-bounded-loads.html\n\nhttps://www.akamai.com/es/es/multimedia/documents/technical-publication/consistent-hashing-and-random-trees-distributed-caching-protocols-for-relieving-hot-spots-on-the-world-wide-web-technical-publication.pdf\n\n\nxring Image source: https://ai.googleblog.com/2017/04/consistent-hashing-with-bounded-loads.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farriqaaq%2Fxring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farriqaaq%2Fxring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farriqaaq%2Fxring/lists"}