From fde93cb991e209806b541c7ae67231f37ae6ebf8 Mon Sep 17 00:00:00 2001 From: Brandur Date: Sat, 5 Nov 2016 22:54:03 -0700 Subject: [PATCH] More additions/clarifications to the README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index fe7f47c..5577237 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ as easy as: $ brew install rust ``` +(If there's sufficient interest in the project I'll start to distribute +precompiled binaries.) + Clone and build the project: ``` @@ -52,6 +55,15 @@ the module. It's used like this: TH.THROTTLE [] ``` +Where `key` is an identifier to rate limit against. Examples might be: + +* A user account's unique identifier. +* The origin IP address of an incoming request. +* A static string (e.g. `global`) to limit actions across the entire system. + +like a user account's unique identifier, the origin IP address of an incoming +request, + For example: ``` @@ -63,6 +75,8 @@ TH.THROTTLE user123 15 30 60 1 └─────────────────── key "user123" ``` +### Response + This means that a single token (the `1` in the last parameter) should be applied against the rate limit of the key `user123`. 30 tokens on the key are allowed over a 60 second period with a maximum initial burst of 15 tokens. Rate