protocol-router
v2.0.0
Published
Inter-host application-layer router capable of dynamic service discovery
Downloads
3
Readme
Protocol Router
Inter-host application-layer router capable of dynamic service discovery
Install
npm install -g protocol-router
Usage
- start one sidekick router for each cluster application
- point an applications router towards the routers of that apps dependencies
usage: protocol-router [OPTIONS] [NAME TARGET]
A peer router connects with other peers and forwards
local requests across the network to other routers
Params
NAME the name of the router
e.g. authService
TARGET the upstream host the router serves
e.g. http://localhost:2090
Options
--require -r REMOTE Remote must have the form SOCKET_PATH=PROTOCOL://HOST:PORT
e.g. -r ./myservice.sock=tcp://localhost:4040
Etcd Options
--etcd -E enable etcd
--etcd-root -r ETCD_PATH register this router in etcd under ETCD_PATH
(default: /services/$NAME)
--etcd-update -u PERIOD the etcd update period
(default: 30)
--etcd-ttl -l PERIOD the etcd expiry period
(default: 60)
--etcd-host -e ETCD_HOST etcd hostname and port HOSTNAME:PORT
(default: localhost:4001)
Environment
HOST this router listens on interface HOST
PORT this router listens on port PORT