Skip to content

Load Balancer for fault-tolerant Ethereum and Bitcoin infrastructure (+ forks)

License

Notifications You must be signed in to change notification settings

OnGridSystems/LoadBalancer

Repository files navigation

OnGrid Systems Blockchain Applications DApps Development

GitHub last commit Ethereum grant status License

Blockchain Load Balancer

Load balancer / reverse proxy written in GoLang for blockchain nodes. It provides redundant interface for applications using Ethereum and acts as a reverse proxy sitting between ethereum client and nodes. It constantly checks the node availability and its latest block number and keeps the list of healthy web3 providers. If node goes offline or slows down the requests fall back to another node. Only Ethereum Web3 over HTTPs nodes are currently supported (see roadmap)

Install

With docker

docker build . -t loadbalancer

Without docker

go get -u github.com/golang/dep/cmd/dep
dep ensure
go build

Configure

Example config file

port: 8000
check_interval: 30  # seconds
connection_timeout: 5 # seconds
nodes:
  - https://mainnet.infura.io/token
  - http://localhost:8545
block_treshold: 10
  • port - listening port
  • check_interval - nodes polling interval
  • connection_timeout - nodes polling connection timeout
  • nodes - list of polling nodes
  • block_treshold - node switch block treshold

Run

With docker

docker run -v config.yml:/config.yml loadbalancer

Without docker

LoadBalancer -c /path/to/config.yml

License

Each file included in this repository is licensed under the MIT license.

About

Load Balancer for fault-tolerant Ethereum and Bitcoin infrastructure (+ forks)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages