/go-consistent-hashing

Golang implementation of consistent-hashing-algorithm

Primary LanguageGoApache License 2.0Apache-2.0

go-consistent-hashing

Golang implementation of consistent-hashing.

Links

Start

First install goreman, which manages Procfile-based applications.

  1. Start proxy server
$ cd cmd/proxy-server
$ go build -o proxy-server
$ goreman start
  1. Start kv-store servers
$ cd cmd/kv-server
$ go build -o kv-server
$ goreman start

Usage

Try to use different keys and observe the proxy server's console log.

$ curl http://127.0.0.1:3333/key?key=${key}
$ curl http://127.0.0.1:3333/key_least?key=${key}