https://github.com/samdvr/consistenthash-routing
Consistent Hash Routing
https://github.com/samdvr/consistenthash-routing
Last synced: 8 months ago
JSON representation
Consistent Hash Routing
- Host: GitHub
- URL: https://github.com/samdvr/consistenthash-routing
- Owner: samdvr
- Created: 2019-03-30T03:40:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-30T22:49:57.000Z (about 7 years ago)
- Last Synced: 2025-10-09T17:05:31.550Z (8 months ago)
- Language: Scala
- Size: 11.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Consistent Hashing Router
This library provides a consistent hashing algorithm
to route to different service discovery implementations.
Currently, supports consul with jump hash algorithm.
```scala
import com.samdvr.consistenthashrouting.consul._
val key = 123
val node = ConsulRouter(new consul.Consul(CONSUL_IP, CONSUL_PORT, Option(CONSUL_ACL_TOKEN))).get(key)
```