<p>I was just thinking about why redis was chosen over memcache..</p>
<p>Ignoring any capability differences, service and technology sprawl was the first thing that crossed my mind.</p>
<p>Is redis providing more than the, more then likely preexisting, memcache and rabbitmq combination?</p>
<p>Thanks,<br>
Kiall</p>
<p>Sent from my phone.</p>
<div class="gmail_quote">On Mar 17, 2012 4:58 p.m., "John Dickinson" <<a href="mailto:me@not.mn">me@not.mn</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you're looking for wsgi rate limiting, take a look at swift's rate limiting middleware. It's distributed, simple (uses memcached to keep track of what's going on), supports multiple tiers of rate limiting (with interpolation between them), and white/black lists.<br>

<br>
While swift's rate limiting is tuned for swift, its technique could be pretty simply adapted to other applications. Swift's rate limiting is swift-specific in what it checks to rate limit on. Those checks should be able to be adapted to other use cases.<br>

<br>
source: <a href="https://github.com/openstack/swift/blob/master/swift/common/middleware/ratelimit.py" target="_blank">https://github.com/openstack/swift/blob/master/swift/common/middleware/ratelimit.py</a><br>
docs: <a href="https://github.com/openstack/swift/blob/master/doc/source/ratelimit.rst" target="_blank">https://github.com/openstack/swift/blob/master/doc/source/ratelimit.rst</a><br>
sample config: <a href="https://github.com/openstack/swift/blob/master/etc/proxy-server.conf-sample#L118" target="_blank">https://github.com/openstack/swift/blob/master/etc/proxy-server.conf-sample#L118</a><br>
<br>
--John<br>
<br>
On Mar 16, 2012, at 4:45 PM, Kevin L. Mitchell wrote:<br>
<br>
> Howdy, folks.  I've been working on a replacement for nova's<br>
> rate-limiting middleware that will handle the multiple-node case, and<br>
> I've developed a fairly generic rate-limiting package, along with a<br>
> second package that adapts it to nova.  (This means you could also use<br>
> this rate-limiting setup with, say, glance, or with any other project<br>
> that uses Python middleware.)  Here is some information:<br>
><br>
> * Turnstile<br>
>        Turnstile is a piece of WSGI middleware that performs true distributed<br>
>        rate-limiting.  System administrators can run an API on multiple<br>
>        nodes, then place this middleware in the pipeline prior to the<br>
>        application.  Turnstile uses a Redis database to track the rate at<br>
>        which users are hitting the API, and can then apply configured rate<br>
>        limits, even if each request was made against a different API node.<br>
><br>
>        - <a href="https://github.com/klmitch/turnstile" target="_blank">https://github.com/klmitch/turnstile</a><br>
>        - <a href="http://pypi.python.org/pypi/turnstile" target="_blank">http://pypi.python.org/pypi/turnstile</a><br>
><br>
> * nova_limits<br>
>        This package provides the ``nova_limits`` Python module, which<br>
>        contains the ``nova_preprocess()`` preprocessor, the<br>
>        ``NovaClassLimit`` limit class, and the ``NovaTurnstileMiddleware``<br>
>        replacement middleware class, all for use with Turnstile.  These<br>
>        pieces work together to provide class-based rate limiting integration<br>
>        with nova.<br>
><br>
>        - <a href="https://github.com/klmitch/nova_limits" target="_blank">https://github.com/klmitch/nova_limits</a><br>
>        - <a href="http://pypi.python.org/pypi/nova_limits" target="_blank">http://pypi.python.org/pypi/nova_limits</a><br>
><br>
> Both packages should be fairly well documented (start with README.rst),<br>
> and please feel free to log issues or make pull requests.<br>
> --<br>
> Kevin L. Mitchell <<a href="mailto:kevin.mitchell@rackspace.com">kevin.mitchell@rackspace.com</a>><br>
><br>
><br>
> _______________________________________________<br>
> Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
> Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
> Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
> More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div>