Skip to content

nginx rate limiting

Vincent Breitmoser requested to merge nginx-rate-limiting into master

This MR introduces some basic rate limiting. I also improved error pages a bit, and with a tip from Bjarni I was able to reduce the amount of if statements in the nginx rules significantly. We now completely ignore any hkp parameters other than op and search.

Requests by email are limited to 1/m and throw a 429 error. Requests by fpr/keyid are limited to 5/s and just delay. Both have fairly high allowed burst rates.

This is currently deployed on https://testing2.keys.openpgp.org, if anyone wants to give it a go. For example, just keep refreshing any of these URIs:

Rate limit error pages (only on email queries) use status code 429.

Merge request reports

Loading