Skip to main content

Load Balancer for TCP.

Project description

http://www.flickr.com/photos/gorupka/2343360380/

greenbalance

greenbalance is a simple TCP load balancer with round-robin and weighted random support built on gevent and wr.

Usage

Simple example; this will make the load balancer listen on port 8080 and use a custom configuration.

$ greenbalance --port 8080 --config /path/to/my.config

Arguments

Arguments accepted by the greenbalance command.

--version

Show program’s version number and exit.

-h, --help

Show this help message and exit.

-H, --host

IP or Hostname.

-p, --port

Listening Port.

-c, --config

Configuration file.

-l, --logfile

Log File

-L, --loglevel

Log Level (debug, info, warning, error, critical)

greenbalance.conf

greenbalance.conf is by default placed in /etc if the package was intalled with root privileges. If you have the package installed in a virtualenv you will have to create a configuration file manually and pass it with the --config or -c argument.

[settings]
host = 0.0.0.0           # Bind to this (0.0.0.0 = all)
port = 3001              # Listening port.

[logging]
loglevel = debug
logfile = /var/log/greenbalance.log

[nodes]
backend1 3101 = 20       # will serve 20% of the requests.
192.168.100.7 3102 = 40  # will serve 40% of the requests.
localhost 3103 = 40      # will serve 40% of the requests.

Installation

See below for OS-specific preparations.

Install greenbalance with:

sudo pip install greenbalance

Ubuntu

sudo apt-get install python-pip python-gevent; sudo pip install --upgrade pip

CentOS

Install python-pip and python-gevent from epel.

Documentation

Documentation is available at readthedocs.org

License

GPL

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

greenbalance-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file greenbalance-0.2.0.tar.gz.

File metadata

File hashes

Hashes for greenbalance-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a44520e1ce422e02ca00712d568bf78e53d70890ca231b363b875f66ce8a2024
MD5 0a7d05a3aaab0001d951320d71829a24
BLAKE2b-256 15e2d2e141ad3c0a8daf76b709476504491051e146e72c271f12586f92f9f458

See more details on using hashes here.

Supported by

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