Attempt to rebalance the render servers
authorTom Hughes <tom@compton.nu>
Tue, 26 Feb 2019 09:35:54 +0000 (09:35 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 26 Feb 2019 09:35:54 +0000 (09:35 +0000)
Makefile
bin/mkgeo
src/render.openstreetmap

index cf3a462..3cdf57f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ data/tile.openstreetmap.org json/tile.openstreetmap.org.json origins/render.open
        bin/mkgeo origins/tile.openstreetmap.yml src/tile.openstreetmap tile.openstreetmap.org origins/render.openstreetmap.yml
 
 data/render.openstreetmap.org json/render.openstreetmap.org.json: bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap
-       bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap render.openstreetmap.org
+       bin/mkgeo origins/render.openstreetmap.yml src/render.openstreetmap render.openstreetmap.org origins/total.openstreetmap.yml
 
 data/%:
        sed -r -e 's/$(notdir $<)(:|$$)/$(notdir $@)\1/g' < $< > $@
index bd5bfbb..1b9f87f 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -292,8 +292,20 @@ sub match_origin
     my $match;
 
     if ($cluster->{preferred} &&
-        $cluster->{preferred}->{countries} &&
-        grep { $_ eq $origin->{country} } @{$cluster->{preferred}->{countries}})
+        $cluster->{preferred}->{origins} &&
+        grep { $_ eq $origin->{name} } @{$cluster->{preferred}->{origins}})
+    {
+        $match = "preferred";
+    }
+    elsif ($cluster->{allowed} &&
+           $cluster->{allowed}->{origins} &&
+           grep { $_ eq $origin->{name} } @{$cluster->{allowed}->{origins}})
+    {
+        $match = "allowed";
+    }
+    elsif ($cluster->{preferred} &&
+           $cluster->{preferred}->{countries} &&
+           grep { $_ eq $origin->{country} } @{$cluster->{preferred}->{countries}})
     {
         $match = "preferred";
     }
index 70cd238..b03f995 100644 (file)
@@ -4,10 +4,13 @@ orm:
   statuscake:
     - 2217312
   colour: "#bfa730"
-  bandwidth: 200
+  bandwidth: 300
   ipv4: 130.117.76.3
   ipv6: 200109780002002c0000000001720003
   default: ""
+  preferred:
+    origins:
+      - amsterdam
 
 yevaud:
   lat: 51.5228002
@@ -18,6 +21,9 @@ yevaud:
   bandwidth: 300
   ipv4: 193.60.236.22
   default: ""
+  preferred:
+    origins:
+      - london
 
 scorch:
   lat: 50.6911904
@@ -25,10 +31,13 @@ scorch:
   statuscake:
     - 2217314
   colour: "#bf8230"
-  bandwidth: 300
+  bandwidth: 500
   ipv4: 176.31.235.79
   ipv6: 200141d00002fc4f0000000000000001
   default: ""
+  preferred:
+    origins:
+      - france
 
 rhaegal:
   lat: 45.8082123
@@ -36,9 +45,13 @@ rhaegal:
   statuscake:
     - 3343399
   colour: "#a1b92e"
-  bandwidth: 350
+  bandwidth: 700
   ipv4: 161.53.248.77
   default: ""
+  preferred:
+    origins:
+      - osijek
+      - pula
 
 pyrene:
   lat: 44.5639267
@@ -46,10 +59,18 @@ pyrene:
   statuscake:
     - 3451753
   colour: "#269926"
-  bandwidth: 300
+  bandwidth: 500
   ipv4: 140.211.167.98
   ipv6: 2605bc8030100700000000008cd3a762
   default: ""
+  preferred:
+    origins:
+      - corvallis
+      - hsinchu
+      - montreal
+      - sanfrancisco
+      - vinadelmar
+      - wellington
 
 # Spare colours:
 #