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

Uploaded Python 3

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

Hashes for rapidbalancer-0.0.7.tar.gz
Algorithm Hash digest
SHA256 de787fcb3b56b981cbb4de26cbcf0b0e9f50f01035c06bfd84185b630b37bd28
MD5 2f73165b1802dd6f8572d921326c9778
BLAKE2b-256 1e755185cb8f7f919c5bfa07b421ee1b7a4889372055534f2897a4835551f65c

See more details on using hashes here.

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

Hashes for rapidbalancer-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4b5b448d29a076bb94a953c248514507ca78fbadb3128bb8c10028f28c44a5
MD5 0350a0437049e374260e918a4f9f2a7d
BLAKE2b-256 e43ac1f39c6483567bb7a7576ad746d7b9550b4418fbf154bcc7c594d35cefed

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