npchat-helmsman
Simple load-balancer for npchat servers, based on the xor distance metric between node & user id.
Local Development
Clone this repository, and run go get .
to install dependencies.
Make a config.json
, for example:
{
"port": 8080,
"nodes": [
{
"name": "axl",
"host": "axl.npchat.org",
"tls": true
},
{
"name": "local",
"host": "localhost:8000",
"tls": false
}
]
}
Run go run . --config=./config.json
Check it with
curl --request GET 'http://localhost:8080/info'