planet: Rate limit downloads to help fibre fault
authorGrant Slater <git@firefishy.com>
Mon, 13 Jan 2020 14:54:04 +0000 (14:54 +0000)
committerGrant Slater <git@firefishy.com>
Mon, 13 Jan 2020 14:54:04 +0000 (14:54 +0000)
cookbooks/planet/recipes/default.rb
cookbooks/planet/templates/default/apache.erb

index 28b1abdb8d6f6bfb0790c196938257fd14930cf2..5dd5953f85aaef5164b3349edcb882f046651a39 100644 (file)
@@ -97,6 +97,7 @@ end
 apache_module "cgid"
 apache_module "rewrite"
 apache_module "proxy_http"
+apache_module "ratelimit"
 
 ssl_certificate "planet.openstreetmap.org" do
   domains ["planet.openstreetmap.org", "planet.osm.org"]
index a67189a0dbb9df8065442de41823c9d2a7a4604f..8b46d6b0412d7d7807dd2de2ddec20462469ee8f 100644 (file)
         RewriteRule ^(/cc\-by\-sa/changesets\-latest\.osm\.bz2)$        ${latestplanet:$1} [R,L]
         RewriteRule ^(/cc\-by\-sa/relations\-latest\.osm\.bz2)$         ${latestplanet:$1} [R,L]
 
+        # Temporary download rate limit due to upstream fibre connection issues. - 13 Jan 2020
+        SetOutputFilter RATE_LIMIT
+        SetEnv rate-limit 400
+        SetEnv rate-initial-burst 512
+
 </VirtualHost>
 
 <VirtualHost *:80>