From 03488469f510b4782eb9caa381c85d7bf265a425 Mon Sep 17 00:00:00 2001 From: Ken Cochrane Date: Tue, 30 Dec 2014 18:19:53 -0500 Subject: [PATCH] cleaned up readme --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2ca1695..39d2c75 100644 --- a/README.md +++ b/README.md @@ -97,18 +97,23 @@ destination. Cache backend: ============== -IP_attempts (count, TTL) -username_attempts (count, TTL) -ip_blocks (list) # how to expire when in a list? -username_blocks (list) # how to expire item in the list? +- IP_attempts (count, TTL) +- username_attempts (count, TTL) +- ip_blocks (list) # how to expire when in a list? +- username_blocks (list) # how to expire item in the list? -prefix:failed:ip:[ip] (count, expires) -prefix:failed:username:[username] (count, expires) -prefix:blocked:ip:[ip] (true, TTL) -prefix:blocked:username:[username] (true, TTL) +cache keys: +----------- +- prefix:failed:ip:[ip] (count, expires) +- prefix:failed:username:[username] (count, expires) +- prefix:blocked:ip:[ip] (true, TTL) +- prefix:blocked:username:[username] (true, TTL) +Rate limiting Example +--------------------- +``` # example of how to do rate limiting by IP # assuming it is 10 requests being the limit # this assumes there is a DECAY of DECAY_TIME @@ -125,3 +130,4 @@ ELSE EXPIRE(ip, DECAY_TIME) EXEC END +```