Dshackle is an L7 Load Balancer for Blockchain APIs, equipped with features such as automatic discovery, health checking, secure access, and TLS with client authentication, among others. It can be configured as an edge proxy, a middle proxy, or an API gateway.
Dshackle provides a high-level aggregated API that operates atop several underlying upstreams, including blockchain nodes or providers like Geth, Parity, Infura, etc. It autonomously verifies their availability along with the current network status, routes requests to an available node, and ensures the responses are consistent and/or data is successfully broadcast across the network.
Example use cases:
-
Query for a transaction (block, etc) tries to find it on different nodes and/or retry until it’s found or there is a consistent answer from upstreams
-
Getting nonce to send a transaction makes sure it’s larges value over several nodes
-
Sending transaction distributes it to several nodes in parallel
Availability and fault tolerance:
-
Dshackle connects to several upstreams via JSON RPC, Websockets or gRPC protocols
-
It verifies if a node ("upstream") is fully synchronized (not in initial sync mode), has enough peers and its height is not behind other nodes
-
If an upstream lags behind, lost peers, started to resync, or simply goes down then Dshackle temporarily excludes it from routing and returns back when the upstream’s problem is fixed
Main goals:
-
stable and a fault tolerant access to blockchain nodes
-
secure connections and authentication
-
allow to build scalable APIs with nodes distributed over multiple data centers
Contact [email protected] if you want to integrate Dshackle into your project or want to sponsor the development.