Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rapidbalancer-0.0.9.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rapidbalancer-0.0.9-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file rapidbalancer-0.0.9.tar.gz.

File metadata

  • Download URL: rapidbalancer-0.0.9.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for rapidbalancer-0.0.9.tar.gz
Algorithm Hash digest
SHA256 5b75815543c5ffc47b3a463d327622bc869c8d64c4ab4dc8531a6fe9e1dee183
MD5 54634aa9ae95bc29d1eee65e95bfba46
BLAKE2b-256 5238f8dc295943af42ae86676ced927f68c9401b9fcb4391c7a21213c4b18a2a

See more details on using hashes here.

File details

Details for the file rapidbalancer-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: rapidbalancer-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for rapidbalancer-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c5d4caf61c4202a9fe30b95c502e60033675b360e1b6d663598b440dfe846b5d
MD5 146c58ecc547aad3c2b5491b7cef3fb1
BLAKE2b-256 88fc08d719d0fb496e959ec57d0d75eaae2169dd85c229094bbd364b89bab886

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page