Skip to main content

Upstream selection.

Project description

https://travis-ci.org/bninja/rump.png https://coveralls.io/repos/bninja/rump/badge.png

R(outing)Ump(ire) is an experimenal upstream (i.e. server) selector for HTTP requests. It does not proxy the request but instead integrates with a load-balancer or reverse-proxy that exposes an upstream selection interface:

dev

$ git clone git@github.com:bninja/rump.git
$ cd rump
$ mkvirtualenv rump
(rump)$ pip install -e .[tests]
(rump)$ py.test test/ --cov=rump --cov-report term-missing

wtf?

Typically you can embed complex routing logic directly in a load-balancer or reverse-proxy (e.g. nginx lua, varnish vcl, etc) and that’s what should be done 99% of the time.

This is an experiment to see what writing a Python based HTTP upstream selector would look like and what flexibility that gives you.

Use it as a program or embed it as a lib in your proxy.

program

Install it:

Use it:

$ rump list
my-router
$ rump show -d my-router
...
$ rump edit -d my-router
$ service rumpd status

lib

Get it:

$ pip install rump

Use it:

import rump

router = rump.Router(
    name='my-router',
    ...
)

upstream = router.match_upstream(router.request_type(wsgi_environ))
if upstream:
   server = upstream()

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

rump-0.2.1.tar.gz (34.8 kB view details)

Uploaded Source

File details

Details for the file rump-0.2.1.tar.gz.

File metadata

  • Download URL: rump-0.2.1.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rump-0.2.1.tar.gz
Algorithm Hash digest
SHA256 857ad69152ec4e94401388e17cbf7ce6459aedd5f44d5e6baf2987b4ce5f24c6
MD5 7eb5d7c011ff399b9190290da399fa82
BLAKE2b-256 cacdbfde05d262a0302dd88fd2d3ca1b0e6b1d81afeecbb72e823ec10c21632c

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