Skip to content

Commit

Permalink
More additions/clarifications to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
brandur committed Nov 6, 2016
1 parent f4f6153 commit fde93cb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down Expand Up @@ -52,6 +55,15 @@ the module. It's used like this:
TH.THROTTLE <key> <max_burst> <count per period> <period> [<quantity>]
```

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:

```
Expand All @@ -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
Expand Down

0 comments on commit fde93cb

Please sign in to comment.