Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An HTTP load balancer that is configurable at runtime
Pull request Compare This branch is 17 commits behind epio:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Mantrid is the HTTP load balancer used for Epio. It is designed with high availability and simplicity in mind: it is configured at runtime with JSON over HTTP and can temporarily hold open connections while backend servers restart. It monitors bandwidth and connection statistics and is ideal for serving large numbers of hostnames.

It trades some raw speed for flexibility, but is still designed to be fast. Its aim is to have latency of no more than 10ms, and have no more than a 10% reduction in throughput.


Mantrid is designed to work with Python 2.6 or 2.7, and requires a Python implementation that supports greenlets (so either CPython or PyPy 1.7 and up).

Quick start

Install Mantrid:

$ sudo python install

Launch Mantrid with the default settings (listening on port 80, management on 8042):

$ sudo mantrid

Add a host:

$ mantrid-client set localhost static false type=test

Then visit http://localhost/ to see the test page.


Mantrid is partially configured using a small configuration file (/etc/mantrid/mantrid.conf) which sets up basic things like ports to listen on. The hostnames and load balancing rules are configured at runtime using a REST API.

A command-line interface, mantrid-client, ships with Mantrid to make simple interactions with the API easier.


Mantrid is released under a BSD (3-clause) license. Contributions are very welcome. If you discover a security issue, please email

Something went wrong with that request. Please try again.