From 1b44b35141603c8c2a3af2cd5e6ae6db9a217bda Mon Sep 17 00:00:00 2001 From: Luc Castera Date: Fri, 1 May 2009 15:09:05 -0400 Subject: [PATCH] README formatting --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3b5a1d6..439961b 100644 --- a/README.md +++ b/README.md @@ -48,12 +48,14 @@ Hello World!

At this point, we have a basic rack application that we can use to test our rack middleware. Now let's get started.

+ ## Redis

We need a way to memorize the number of requests that users are making to our web service if we want to limit the rate at which they can use the API. Every time they make a request, we want to check if they've gone past their rate limit before we respond to the request. We also want to store the fact that they've just made a request. Since every call to our web service requires this check and memorization process, we would like this to be done as fast as possible.

This is where Redis comes in. Redis is a super-fast key-value database that we've highlighted in a previous blog post. It can do about 110,000 SETs per second, about 81,000 GETs per second. That's the kind of performance that we are looking for since we would not like our 'rate limiting' middleware to reduce the performance of our web service.

+ ## Our Rack Middleware

We are assuming that the web service is using HTTP Basic Authentication. You could use another type of authentication and adapt the code to fit your model.