Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
popcorn committed Jun 28, 2024
1 parent 32cf4ff commit d884263
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ This is an HTTP handler module, so it can be used wherever `http.handlers` modul
"window": "",
"max_events": 0
},
"storage": {},
"jitter": 0.0,
"sweep_interval": ""
}
},
"log_key": false,
"storage": {},
"distributed": {
"write_interval": "",
"read_interval": "",
Expand All @@ -99,6 +100,8 @@ All fields are optional, but to be useful, you'll need to define at least one zo

To enable distributed RL, set `distributed` to a non-null object. The default read and write intervals are 5s, but you should tune these for your individual deployments.

To log the key when a rate limit is hit, set `log_key` to `true`.

Storage customizes the storage module that is used. Like normal Caddy convention, all instances with the same storage configuration are considered to be part of a cluster.

Jitter is an optional percentage that adds random variance to the Retry-After time to avoid stampeding herds.
Expand Down Expand Up @@ -133,6 +136,7 @@ rate_limit {
write_interval <duration>
purge_age <duration>
}
log_key <bool>
storage <module...>
jitter <percent>
sweep_interval <duration>
Expand Down

0 comments on commit d884263

Please sign in to comment.