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.2.tar.gz (3.1 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.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rapidbalancer-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 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.2.tar.gz
Algorithm Hash digest
SHA256 b93cb72dc8e7a7cf42abd7b3d3e0b735e6ca7a61d16466e83a51f3db70aecfa9
MD5 58900f7c67b3ce43954bf873dd6a0e44
BLAKE2b-256 350e19422a11ae03a0e209085a5045f273a0ce5bd9609b30759503d3fc46b4da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rapidbalancer-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af566f1faf4b902393fbca7bc6363bfd1b74d1d6e77097746295f81740779836
MD5 fa7597a3af90bb604e783d4b70269f5b
BLAKE2b-256 93606763cf0e6114af0cc04367b1eb62d21a41f3568bfecad2334acbe3463334

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