Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Load Balancer for TCP.

Project Description


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


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 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 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.

host =           # Bind to this ( = all)
port = 3001              # Listening port.

loglevel = debug
logfile = /var/log/greenbalance.log

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


See below for OS-specific preparations.

Install greenbalance with:

sudo pip install greenbalance


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


Install python-pip and python-gevent from epel.


Documentation is available at



Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.3 kB) Copy SHA256 Hash SHA256
Source None May 10, 2012

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting