]> git.openstreetmap.org Git - chef.git/commitdiff
Decrease tile rate limit to 30 TPS
authorPaul Norman <penorman@mac.com>
Thu, 22 Jul 2021 23:00:51 +0000 (16:00 -0700)
committerPaul Norman <penorman@mac.com>
Thu, 22 Jul 2021 23:00:51 +0000 (16:00 -0700)
This is 15 TPS per server, except for pyrene which needs 30.

Now that the rate limiting is working I reviewed IPs exceeding 20
TPS on an hour basis, looking at several days, and they were all
scrapers, or fakes which I would normally block if not for the effort.
I found no non-scraping proxies or NAT.

cookbooks/tile/attributes/default.rb
roles/pyrene.rb

index cdcc1315520e2ea23daa5d92fd1e7298b37aab4b..1396f5cc6204350fd7d0274d27306bae9ef095fe 100644 (file)
@@ -13,8 +13,8 @@ default[:tile][:replication][:url] = "https://planet.osm.org/replication/minute/
 default[:tile][:data] = {}
 default[:tile][:styles] = {}
 
-default[:tile][:ratelimit][:requests_per_second] = 20
-default[:tile][:ratelimit][:maximum_backlog] = 3600
+default[:tile][:ratelimit][:requests_per_second] = 15
+default[:tile][:ratelimit][:maximum_backlog] = 1800
 
 default[:postgresql][:versions] |= [node[:tile][:database][:cluster].split("/").first]
 
index 11cc90954fe93b6bf4bcec856bced2fa81d209ec..2d9c8dbfc87c9f5e42cf708e8f0391746abdbf2f 100644 (file)
@@ -68,8 +68,8 @@ default_attributes(
       }
     },
     :ratelimit => {
-      :requests_per_second => 40,
-      :maximum_backlog => 7200
+      :requests_per_second => 30,
+      :maximum_backlog => 3600
     }
   }
 )