A simple yet efficient Solana rpc load balancer
SolBalancer is a lightweight, robust Node.js server designed to act as a load balancer for Solana RPC nodes. By monitoring the health of RPC nodes and routing requests based on response times, SolBalancer ensures optimal and uninterrupted access to the Solana network.
- Health Checks: Periodically checks the health of all RPC nodes to determine their availability.
- Load Balancing: Routes requests to the RPC node with the best response time.
- Fault Tolerance: Automatically reroutes requests if an RPC node is down or not responding.
- Caching: Caches responses to improve response times and reduce the load on RPC nodes.
- Node.js
- npm
- Clone the repository:
git clone <repository_url>
- Navigate to the project directory:
cd SolBalancer
- Install dependencies:
npm install
- Start the development server:
npm run dev
- By default, the server will start on port 9090. Access it at:
http://localhost:9090
- Send POST requests to the server's root endpoint with the desired method and parameters to interact with the Solana network.
-
RPC Nodes: The system uses a predefined list of RPC node URLs. You can modify this list to include your preferred RPC nodes.
-
Cache Configuration: Modify cache settings such as duration and interval to suit the demands of your application.
- Fork the repository.
- Create a new branch for your features or fixes.
- Send a pull request.
- Multiple Strategies: Incorporate various load-balancing strategies like Round Robin, Weighted, etc.
- Analytics Dashboard: Implement a UI to visualize traffic, response times, and node health.
- Extended Caching: Enhance caching mechanisms to support distributed caches like Redis.
This project is licensed under the MIT License. See the LICENSE
file for details.
For support, feature requests, or feedback, please open an issue on the GitHub repository or contact the maintainer directly.
- Solana
- Express.js
- Axios
This documentation provides a comprehensive introduction to SolBalancer, detailing its features, installation steps, usage, and more. As the project grows and evolves, it's crucial to keep the documentation updated to reflect any changes.