Skip to main content

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

rapidbalancer-0.0.4.tar.gz (7.5 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.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rapidbalancer-0.0.4.tar.gz
Algorithm Hash digest
SHA256 bbfd82c8b1442ecf612d2c38c17bc6dc93f55b5fc3a5ba926d62eb13a94fac29
MD5 3c3a2aebf1dfd05f40535a12cfd4dc62
BLAKE2b-256 52c97edbcb52ed697d8f133f220a7a21f29fab654a23d8743d512e48fc6a4fcb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rapidbalancer-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6a94ca93bb970b0993261d8bb8502e4ef56ab9bb92493b311d7539fcb2c632ee
MD5 f1b64868c0dbecd528dbe0cc9b701e45
BLAKE2b-256 157036997ec4d7918dace967e79d85d70136624a2d09f4321d02e611a138711b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page