{"id":16962056,"url":"https://github.com/wangdahoo/redis-sharding","last_synced_at":"2026-04-15T18:32:15.984Z","repository":{"id":89195713,"uuid":"131477681","full_name":"wangdahoo/redis-sharding","owner":"wangdahoo","description":"redis sharding via HashRing","archived":false,"fork":false,"pushed_at":"2018-06-28T04:38:47.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-22T17:05:38.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangdahoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-29T08:21:55.000Z","updated_at":"2019-02-26T05:27:10.000Z","dependencies_parsed_at":"2023-03-29T20:35:33.175Z","dependency_job_id":null,"html_url":"https://github.com/wangdahoo/redis-sharding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wangdahoo/redis-sharding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fredis-sharding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fredis-sharding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fredis-sharding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fredis-sharding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangdahoo","download_url":"https://codeload.github.com/wangdahoo/redis-sharding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fredis-sharding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31854745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-13T23:05:08.685Z","updated_at":"2026-04-15T18:32:15.975Z","avatar_url":"https://github.com/wangdahoo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redis-sharding\n\u003e simple redis sharding based on [Redis](https://www.npmjs.com/package/redis) and [HashRing](https://www.npmjs.com/package/hashring)\n\n### How to Use\n\n```bash\n$ npm i redis-sharding\n```\n\n* client\n\n```js\nconst Sharding = require('redis-sharding')\n\nconst sharding = new Sharding({\n  '127.0.0.1:7000': { vnodes: 50 },\n  '127.0.0.1:7001': { vnodes: 50 },\n  '127.0.0.1:7002': { vnodes: 50 },\n  '127.0.0.1:7003': { vnodes: 50 }\n})\n\nconst client = sharding.getClient()\nclient\n  .set('foo', 'bar')\n  .then(server =\u003e console.log(server)) // =\u003e 127.0.0.1:7001\n  .then(() =\u003e client.get('foo'))\n  .then(value =\u003e console.log(value)) // =\u003e bar\n```\n\n* multi\n\n```js\nconst Sharding = require('redis-sharding')\n\nconst sharding = new Sharding({\n  '127.0.0.1:7000': { vnodes: 50 },\n  '127.0.0.1:7001': { vnodes: 50 },\n  '127.0.0.1:7002': { vnodes: 50 },\n  '127.0.0.1:7003': { vnodes: 50 }\n})\n\nconst multi = sharding.getMulti()\nawait multi.set('a', 'foo')\nawait multi.set('b', 'bar')\nawait multi.get('a')\nawait multi.get('b')\nconst replies = await multi.execAsync()\nconsole.log(replies) // =\u003e [127.0.0.1:7002, 127.0.0.1:7000, 'foo', 'bar']\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangdahoo%2Fredis-sharding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangdahoo%2Fredis-sharding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangdahoo%2Fredis-sharding/lists"}