From 2ecb8ca90ac730ada6e083aebd8f3265033f46d5 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Thu, 22 Jul 2021 16:00:51 -0700 Subject: [PATCH] Decrease tile rate limit to 30 TPS 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 | 4 ++-- roles/pyrene.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbooks/tile/attributes/default.rb b/cookbooks/tile/attributes/default.rb index cdcc13155..1396f5cc6 100644 --- a/cookbooks/tile/attributes/default.rb +++ b/cookbooks/tile/attributes/default.rb @@ -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] diff --git a/roles/pyrene.rb b/roles/pyrene.rb index 11cc90954..2d9c8dbfc 100644 --- a/roles/pyrene.rb +++ b/roles/pyrene.rb @@ -68,8 +68,8 @@ default_attributes( } }, :ratelimit => { - :requests_per_second => 40, - :maximum_backlog => 7200 + :requests_per_second => 30, + :maximum_backlog => 3600 } } ) -- 2.39.5