summaryrefslogtreecommitdiffstats
path: root/upgrading
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-02-01 11:55:44 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2018-02-24 14:57:31 +0100
commit27654afadb5088dda4eafd83f07410c2a48fa4b0 (patch)
tree504d5fdb20e8f6be6a757f70054edc1db737b839 /upgrading
parentf51d4c32cd8bed69d2f6b0c50424280613c68496 (diff)
downloadaur-27654afadb5088dda4eafd83f07410c2a48fa4b0.tar.gz
aur-27654afadb5088dda4eafd83f07410c2a48fa4b0.tar.xz
Add rate limit support to API
This allows us to prevent users from hammering the API every few seconds to check if any of their packages were updated. Real world users check as often as every 5 or 10 seconds. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'upgrading')
-rw-r--r--upgrading/4.7.0.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/upgrading/4.7.0.txt b/upgrading/4.7.0.txt
new file mode 100644
index 00000000..820e4540
--- /dev/null
+++ b/upgrading/4.7.0.txt
@@ -0,0 +1,11 @@
+1. Add ApiRateLimit table:
+
+---
+CREATE TABLE `ApiRateLimit` (
+ IP VARCHAR(45) NOT NULL,
+ Requests INT(11) NOT NULL,
+ WindowStart BIGINT(20) NOT NULL,
+ PRIMARY KEY (`ip`)
+) ENGINE = InnoDB;
+CREATE INDEX ApiRateLimitWindowStart ON ApiRateLimit (WindowStart);
+---