| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 15 Jan 2026 07:52:45 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20101017053222
location: https://web.archive.org/web/20101017053222/https://github.com/bnoguchi/node-hash-ring
server-timing: captures_list;dur=1.166261, exclusion.robots;dur=0.089883, exclusion.robots.policy;dur=0.071451, esindex;dur=0.016879, cdx.remote;dur=7.241659, LoadShardBlock;dur=121.205508, PetaboxLoader3.datanode;dur=57.103848, PetaboxLoader3.resolve;dur=12.910903
x-app-server: wwwb-app222-dc8
x-ts: 302
x-tr: 178
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app222; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 15 Jan 2026 07:52:47 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.67
x-archive-orig-date: Sun, 17 Oct 2010 05:32:15 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "7341cdaffc80255d6c23ec70d1d65e46"
x-archive-orig-x-runtime: 75ms
x-archive-orig-content-length: 31526
x-archive-orig-set-cookie: _github_ses=BAh7BzoRbG9jYWxlX2d1ZXNzMCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--e10506e0f6935897cafe4f56774e20aa35e579a5; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 17 Oct 2010 05:32:22 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_18_20101017052301_crawl101-c/52_18_20101017053156_crawl101.arc.gz
server-timing: captures_list;dur=0.445070, exclusion.robots;dur=0.024785, exclusion.robots.policy;dur=0.006442, esindex;dur=0.008018, cdx.remote;dur=37.962944, LoadShardBlock;dur=420.996406, PetaboxLoader3.datanode;dur=698.044861, PetaboxLoader3.resolve;dur=169.615378, load_resource;dur=552.570523
x-app-server: wwwb-app222-dc8
x-ts: 200
x-tr: 1065
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
bnoguchi's node-hash-ring at master - GitHub
- Source
- Commits
- Network (1)
- Issues (0)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
Sending Request…
Downloads
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Aug 20 05:29:34 -0700 2010 | Initial commit. As far as I can tell, this is a... [bnoguchi] |
| |
README.md | Mon Aug 23 19:30:30 -0700 2010 | Fixed github url typo in the README [bnoguchi] |
| |
lib/ | Fri Aug 20 05:29:34 -0700 2010 | Initial commit. As far as I can tell, this is a... [bnoguchi] |
| |
src/ | Fri Aug 20 05:29:34 -0700 2010 | Initial commit. As far as I can tell, this is a... [bnoguchi] |
| |
test/ | Mon Aug 23 17:40:05 -0700 2010 | Removed stale test file. Added a Readme. [bnoguchi] |
README.md
node-hash-ring - Consistent Hashing C++ Add-on for node.js
See this blog post for more information.
Installation
git clone https://github.com/bnoguchi/node-hash-ring.git
cd node-hash-ring/src
node-waf configure build
Example
var sys = require("sys"),
HashRing = require("./lib/hash_ring");
// Create a cluster of 3 servers weighted so that 127.0.0.2:8080 stores twice as many
// keys as 127.0.0.1:8080, and 127.0.0.3:8080 stores 4x as many keys as 127.0.0.1:8080
// and 2x as many keys as 127.0.0.2:8080
var ring = new HashRing({"127.0.0.1:8080": 1, "127.0.0.2:8080": 2, "127.0.0.3:8080":4});
sys.log(ring.getNode("users:102") ); // Should be 127.0.0.3:8080
See ./test/test_distribution.js for another example:
node test/test_distribution.js
License
MIT License
Author
Brian Noguchi
- © 2010 GitHub Inc. All rights reserved.
- Terms of Service
- Privacy
- Security
Keyboard Shortcuts
Site wide shortcuts
- s
- Focus site search
- ?
- Bring up this help dialog
Commit list
- j
- Move selected down
- k
- Move selected up
- t
- Open tree
- p
- Open parent
- c or o or enter
- Open commit
Pull request list
- j
- Move selected down
- k
- Move selected up
- o or enter
- Open issue
Issues
- j
- Move selected down
- k
- Move selected up
- x
- Toggle select target
- o or enter
- Open issue
- I
- Mark selected as read
- U
- Mark selected as unread
- e
- Close selected
- y
- Remove selected from view
- c
- Create issue
- l
- Create label
- i
- Back to inbox
- u
- Back to issues
- /
- Focus issues search
Network Graph
- ← or h
- Scroll left
- → or l
- Scroll right
- ↑ or k
- Scroll up
- ↓ or j
- Scroll down
- t
- Toggle visibility of head labels
- shift ← or shift h
- Scroll all the way left
- shift → or shift l
- Scroll all the way right
- shift ↑ or shift k
- Scroll all the way up
- shift ↓ or shift j
- Scroll all the way down