Coder Social home page Coder Social logo

ifechukwudaniel / blutgang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rainshowerlabs/blutgang

0.0 2.0 0.0 164 KB

the wd-40 of minimalist load balancers

License: GNU Affero General Public License v3.0

Python 2.55% Rust 95.44% Dockerfile 2.00%

blutgang's Introduction

Blutgang - the wd40 of alpha ethereum load balancers

blutgang

Join the discussion on our discord, telegram, or matrix!

Note: Blutgang is alpha software. Unexpected behavior and bugs are to be expected. Please report any issues you encounter.

Blutgang is a blazing fast, caching, minimalistic load balancer designed with Ethereum's json-rpc in mind.

Blutgang's main advantage compared to other load balancers is the speed of its cache. Historical RPC queries are cached in a local database, bypassing the need for slow, repeating calls to your node.

Load Balancing

Blutgang is designed to be used in front of a cluster of Ethereum RPC nodes, distributing the load between them. By default, the load is balanced in a weighted round-robin configuration. Thanks to its modularity, the load balancing algorithm can be customized to support any load balancing schema.

Local usage

If you are a developer or a power user, you can use blutgang as an intermediary between you and your RPC endpoint to cache historical querries. This speeds up usage dramatically, as well as increasing privacy.

How to run

For detailed instructions on how to use blutgang, please read the wiki.

Tldr

Clone the repository, and fint the example_config.toml file. Edit it to your liking, and run cargo run --release -- -c example_config.toml.

If you want to use command line arguments instead, please run cargo run --release -- --help for more info. Keep in mind that the recommended way to run blutgang is via a config file.

Docker

Note: The overhead of running blutgang inside of docker reduces cache read performance by 10-20%.

The official docker image is available on dockerhub.
You must provide a config file to the docker container, as well as expose the port specified. Example:

docker run -v /full/path/to/config.toml:/app/config.toml --network host makemake1337/blutgang

Benchmarks

Benchmarks were performed with a Ryzen 7 2700X, NVME SSD, and default Ubuntu 23.04 kernel. Same RPC endpoints were used

time sothis --source_rpc http://localhost:3000 --mode call_track --contract_address 0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6 --origin_block 17885300 --terminal_block 17892269 --calldata 0x06f13056 --query_interval 20

Figure_1 Figure_2

Notes on the license

Blutgang is libre software licensed under the AGPL-3.0 license. In practice, this means that if you use blutgang for non-personal use, you are required by law to disclose the source code of blutgang, or any works based on or that use the licensed software in any way. This includes MEV bots. Blutgang respects the freedom of it's users and will always be free for non-commercial use.

Commercial use and support

If you want to use blutgang in a commercial setting without disclosing any source code, please reach out.

blutgang's People

Contributors

makemake-kbo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.