Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: rdio

This branch is 26 commits ahead, 20 commits behind RJ:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
c_src
debian
src
Makefile
Makefile.osx
README

README

Originally, it was this: http://www.metabrew.com/article/erlang-libketama-driver-consistent-hashing.

Our use of this driver at Rdio proved the single gen_server to be an occasional bottleneck, so we opted to rewrite the driver with a NIF (http://www.erlang.org/doc/man/erl_nif.html), officially supported from R14B.

INSTALL
make && make install

INITIALIZATION
...
-behavior(application).
...
start(normal, []) ->
    ok = ketama:init("/usr/lib/ketama_nif", "ketama.servers"),
    ...

USE
getserver(Key) when is_binary(Key) ->
    ketama:getserver(Key).
Something went wrong with that request. Please try again.