Um pacote para balanceamento de carga em servidores RapidHost
Project description
RapidBalancer
RapidBalancer is a lightweight and powerful Python load balancer designed for the BetterRapidHost ecosystem.
It provides:
- โ๏ธ Smart load balancing
- ๐ Reverse proxy system
- ๐ Real-time dashboard
- ๐ฅ Client tracking
- ๐ฅ Request monitoring
- ๐ก Traffic analytics
- ๐ Automatic failover
- ๐ง Sticky sessions
- โก High performance routing
- ๐ฅ๏ธ Live node monitoring
with extremely simple syntax.
โจ Features
- โ๏ธ Smart balancing algorithm
- ๐ Automatic node failover
- ๐ก Reverse proxy support
- ๐ฅ Client analytics
- ๐ Real-time dashboard
- ๐ Live statistics API
- ๐ฅ Request inspector
- ๐ง Sticky sessions
- ๐ Multi-node support
- ๐ Optional SSL support
- โก Performance mode
- ๐ Extreme mode
- ๐ LAN and WAN ready
- ๐ BetterRapidHost integration
๐ฆ Installation
Install using pip:
pip install RapidBalancer
๐ Quick Start
Basic Load Balancer
from RapidBalancer import RapidBalancer
RapidBalancer.add(
"127.0.0.1:5000",
"127.0.0.1:5001",
"127.0.0.1:5002",
"127.0.0.1:5003"
)
RapidBalancer.run(
host="0.0.0.0",
port=8080
)
๐ Access
Main Website
http://IP:8080
Dashboard
http://IP:8080/balancer_panel
Stats API
http://IP:8080/balancer_stats
๐ง Smart Balancing
RapidBalancer automatically chooses the best node based on:
- latency
- active connections
- traffic usage
No manual configuration required.
๐ Automatic Failover
If a node goes offline:
NODE 5001 DOWN
RapidBalancer automatically removes it from rotation.
Clients continue accessing the application normally.
๐ฅ Client Tracking
RapidBalancer automatically tracks:
- IP address
- request count
- traffic usage
- visited routes
- user-agent
- connection time
๐ Dashboard
Built-in realtime dashboard includes:
- online nodes
- online clients
- total traffic
- requests
- latency
- CPU usage
- RAM usage
- node statistics
- client analytics
๐ก Reverse Proxy
RapidBalancer acts as a reverse proxy.
Example architecture:
Client
โ
RapidBalancer :8080
โ
RapidHost :5000
RapidHost :5001
RapidHost :5002
RapidHost :5003
๐ฅ BetterRapidHost Integration
RapidHost Example
from BetterRapidHost import RapidHost
RapidHost.hostIP("127.0.0.1")
RapidHost.hostPort(5000)
RapidHost.hostSite("index.html")
RapidBalancer Example
from RapidBalancer import RapidBalancer
RapidBalancer.add(
"127.0.0.1:5000"
)
RapidBalancer.run(
host="0.0.0.0",
port=8080
)
Clients access only:
http://IP:8080
Backend nodes remain hidden and protected.
โก Performance Mode
RapidBalancer.PerformanceMode()
Optimizations:
- lower latency
- faster refresh rate
- higher request limit
๐ Extreme Mode
RapidBalancer.ExtremeMode()
Extreme optimizations:
- ultra low timeout
- ultra fast health checks
- massive request limit
- aggressive balancing
๐ Statistics
Global Stats
RapidBalancer.stats()
Example:
{
"global": {
"requests": 15281,
"traffic": 9283812,
"errors": 2
}
}
๐ Node Management
Add Nodes
RapidBalancer.add(
"127.0.0.1:5000",
"127.0.0.1:5001"
)
Remove Node
RapidBalancer.RemoveNode(
"127.0.0.1",
5000
)
Disable Node
RapidBalancer.DisableNode(
"127.0.0.1",
5000
)
Enable Node
RapidBalancer.EnableNode(
"127.0.0.1",
5000
)
๐ SSL Support
RapidBalancer.enableSSL(
"cert.pem",
"key.pem"
)
๐ฅ Request Inspector
Get request logs:
RapidBalancer.Requests()
๐ฅ๏ธ System Monitor
RapidBalancer.CPUUsage()
RapidBalancer.RAMUsage()
๐ Recommended Architecture
Internet
โ
RapidBalancer
โ
RapidHost Cluster
โก Philosophy
RapidBalancer focuses on:
- simplicity
- realtime monitoring
- scalability
- performance
- minimal syntax
- powerful infrastructure tools
๐ License
MIT License
๐จโ๐ป Author
Leonardo Nery
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rapidbalancer-0.0.7.tar.gz.
File metadata
- Download URL: rapidbalancer-0.0.7.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de787fcb3b56b981cbb4de26cbcf0b0e9f50f01035c06bfd84185b630b37bd28
|
|
| MD5 |
2f73165b1802dd6f8572d921326c9778
|
|
| BLAKE2b-256 |
1e755185cb8f7f919c5bfa07b421ee1b7a4889372055534f2897a4835551f65c
|
File details
Details for the file rapidbalancer-0.0.7-py3-none-any.whl.
File metadata
- Download URL: rapidbalancer-0.0.7-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f4b5b448d29a076bb94a953c248514507ca78fbadb3128bb8c10028f28c44a5
|
|
| MD5 |
0350a0437049e374260e918a4f9f2a7d
|
|
| BLAKE2b-256 |
e43ac1f39c6483567bb7a7576ad746d7b9550b4418fbf154bcc7c594d35cefed
|