diff --git a/CHANGELOG.md b/CHANGELOG.md index e5a890c..92ada63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,23 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] +- New cities: Milan, Rome, Palermo, Lisbon and Athens in Europe; Atlanta, + Denver, Phoenix, Boston, Houston and Salt Lake City in the US. New cables + land with them (Lisbon to Brazil, Africa and the US Southeast; Genoa to + Sicily and Athens; Palermo to Marseille and Alexandria; Athens to Istanbul; + Boston to Dublin), along with local networks to peer with. +- Rival exchanges: 25 big metros now have a second (sometimes third) IX. + Challengers are cheaper and share many members with the incumbent, but not + all of them. Each IX is its own port, LAG and route server. +- The long tail: 60 small, odd networks with a sliver of traffic each, spread + over random exchanges. "Request all willing peers" signs them up in one go, + and they fold into one row in the network lists. +- Europe's peering market is competitive: IX ports there cost 20% less, and + price wars between rival exchanges cut your port bill further. DE-KICKS + responds with a webinar. +- Voda-Phony has ended settlement-free peering. It now peers only over a paid + PNI, through its interconnection partner. +- New US eyeballs Spectre-um Cable and Very-Zone (paid peering only). - Pausing now freezes the map too: packet dots, waves and clouds stop moving until you press play again (#11). - Ports in both buildings: with a second site, any transit port, PNI or IX diff --git a/site/index.html b/site/index.html index 4509547..88697b3 100644 --- a/site/index.html +++ b/site/index.html @@ -546,12 +546,12 @@ function proj0(lon,lat){return [(lon+180)/360*W,(84-lat)*6.4];} for(const L of LENSES){const q=proj0(L.lon,L.lat);L.x=q[0];L.y=q[1];} function proj(lon,lat){const q=proj0(lon,lat);let dx=0,dy=0;for(const L of LENSES){let ex=q[0]-L.x;ex-=W*Math.round(ex/W);const ey=q[1]-L.y,f=L.m*Math.exp(-(ex*ex+ey*ey)/(L.r*L.r));dx+=ex*f;dy+=ey*f;}return [q[0]+dx,q[1]+dy];} function hav(lo1,la1,lo2,la2){const r=Math.PI/180,dLa=(la2-la1)*r,dLo=(lo2-lo1)*r,a=Math.sin(dLa/2)**2+Math.cos(la1*r)*Math.cos(la2*r)*Math.sin(dLo/2)**2;return 2*6371*Math.asin(Math.min(1,Math.sqrt(a)));} -const LANDS_LL=[{id:'am',ll:[[-166,68],[-157,71.2],[-141,69.8],[-128,70],[-115,68.5],[-97,68],[-94,62],[-92.5,57.5],[-85,55.2],[-80,51.5],[-78.5,58],[-77,62],[-70,61],[-64.5,60],[-61.5,56.5],[-57,52],[-55.6,49.5],[-53,47],[-59,46.5],[-61,45.2],[-66,44.5],[-70,43.3],[-70,42],[-74,40.6],[-76,38],[-75.8,35.5],[-77.5,34.5],[-79,33],[-81,31],[-80.05,27],[-80.1,25.3],[-81.5,25],[-82.7,27.5],[-84,30],[-89,30.2],[-94,29.5],[-97,28],[-97.5,25],[-97.7,22],[-96,19],[-94,18.3],[-91,18.5],[-90.4,21],[-87,21.5],[-88,17],[-88.5,15.8],[-84,15.8],[-83.4,12],[-83.7,10.5],[-81.5,9],[-79.5,9.5],[-77.5,8.6],[-75,10.8],[-71.5,12.3],[-68,10.6],[-62,10.5],[-60,8],[-57,6],[-52,5],[-50,1.5],[-48,-1],[-44,-2.5],[-39,-3.5],[-35,-5.5],[-35,-9],[-37.5,-12.5],[-39,-15],[-39.7,-19],[-41,-22],[-44,-23],[-48,-26],[-48.6,-28.5],[-51,-31],[-53,-34],[-58,-34.5],[-57,-37],[-62,-39],[-65,-41],[-64,-43],[-67.5,-46],[-66,-48],[-69,-51],[-68.5,-53],[-70,-55],[-73,-53],[-75,-48],[-73.5,-43],[-73.5,-37],[-71.5,-32],[-71.3,-27],[-70.5,-20],[-71.5,-17],[-76,-14],[-78,-10],[-81,-6],[-80.5,-3],[-80,0],[-79,1.5],[-77.5,4],[-77.4,7.5],[-80,7.3],[-82.5,8.2],[-85.7,10],[-87,12.5],[-91,14],[-94,16],[-96.5,15.7],[-100,17],[-105.5,20],[-105.5,22.5],[-108,25.5],[-110.8,27.9],[-113,31.3],[-114.7,31.7],[-113.5,29],[-112,26.5],[-110,24],[-109.5,23],[-112,24.8],[-114,27.5],[-115.5,29.8],[-117,32.5],[-118.5,34],[-120.6,34.6],[-122.5,37.5],[-124,40.5],[-124.5,43],[-124,46.2],[-124.7,48.4],[-123,49],[-126,50.5],[-130,54.5],[-133,57.5],[-137,58.5],[-141,60],[-146,61],[-150,59.5],[-152,58.5],[-156,57.5],[-158,56.8],[-162,55.5],[-164.5,54.5],[-158,58.5],[-162,60],[-165,61.5],[-166,64],[-164,65.5]]},{id:'eu',ll:[[-9,39],[-9.5,43],[-8,43.7],[-1.8,43.4],[-1.2,46],[-2.5,47.3],[-4.5,48],[-1.6,48.6],[1.5,50.2],[3,51.2],[4.5,52.5],[5,53.4],[7,53.6],[8.6,54],[8.2,55.5],[8.1,57],[10.5,57.7],[10.5,56.5],[11.2,56],[12.6,56.1],[12.7,55.6],[12.1,54.9],[11,54.3],[14,54],[18.5,54.8],[21,55.3],[21,57],[24,57.5],[24,59.2],[28,59.5],[30,60],[28,60.5],[25,60.1],[22.5,60.3],[21.5,61.5],[21.5,63],[25,65],[25.5,65.6],[22,65.8],[20.5,63.5],[18,62.5],[17.4,61],[19,59.8],[18,59],[16.5,57],[16,56.2],[14.2,55.4],[13,55.4],[12.9,56.5],[11.5,58],[10.5,59.3],[8,58],[5.5,58.5],[5,60],[5,62],[7,63],[10,64],[12.5,66],[15,68.5],[18,69.8],[21.5,70.2],[26,71],[30,70],[33,69.3],[41,67],[44,68.5],[53,68.5],[58,69],[68,69],[69,72.8],[73,72.5],[80,73.5],[87,74.8],[100,76],[104,77.7],[112,74],[113.5,73.5],[127,73.5],[132,71.5],[140,72.5],[150,71.5],[160,70],[170,70],[180,69],[190,66.5],[186,64.5],[182,65],[178,62.5],[173,61],[170,60],[164,60],[164,57],[162,55],[159,52],[156.7,51],[156,55.5],[157,58],[155,59.5],[150,59.5],[143,59.3],[137,54.5],[141,53],[140,48.5],[135,43.5],[131,42.7],[129.5,41],[129.4,37],[129.4,35.5],[127.5,34.6],[126.3,34.8],[126.5,37],[125,37.8],[124.5,39.7],[121.5,39],[121.7,40.8],[119,39.3],[117.8,38.5],[119,37.2],[122.5,37.3],[120.5,36],[119.2,35],[121,32],[121.9,30.8],[121.5,28],[119.5,25.5],[116.5,23],[114.3,22.1],[111,21.5],[109.7,20.5],[108.5,21.6],[106.5,20],[106,18],[108.5,15],[109.3,12],[107,10.5],[105,8.6],[104.8,10.3],[103,11],[100.9,12.6],[100,13.4],[99.3,10.5],[100.3,7],[101,6.8],[103.4,4],[104.3,1.4],[103.6,1.25],[101.3,2.8],[100.2,5.3],[98.3,8],[98.6,13],[97.7,16.5],[94.4,16.2],[94.2,18.8],[92.3,20.6],[91.8,22.6],[90,22],[88.3,21.6],[86.9,20.6],[85,19.5],[82.3,16.6],[80.3,15.8],[80.3,13.5],[79.8,10.3],[78.3,8.9],[77.5,8.1],[76.5,8.9],[75.8,11.5],[74.8,12.9],[73.5,16],[72.8,19],[72.7,21.2],[70,22.5],[68.5,23.5],[66.6,25.4],[61.6,25.2],[57.3,25.8],[56.4,27.1],[54.7,26.5],[51.5,27.9],[50,30],[48,30],[48.4,28.5],[49.5,26.7],[50.8,24.8],[50.85,25.6],[51.2,26.15],[51.62,25.9],[51.62,24.6],[52.6,24.2],[54.3,24.6],[55.3,25.3],[55.9,25.75],[56.1,26.1],[56.35,26.38],[56.42,25.8],[56.38,25.0],[56.5,24.6],[57.8,23.8],[58.8,22.5],[59.8,22.4],[58.5,20.5],[57.7,19],[55.4,17.7],[52.2,15.7],[48.7,14],[45,12.8],[43.4,12.6],[42.7,15.7],[42.5,17.2],[41,19.5],[39.1,21.6],[38.4,23.6],[37,25.5],[35.2,28],[34.9,29.5],[34.3,27.8],[33,28.8],[32.6,30],[32.3,31.2],[34.2,31.3],[34.9,32.8],[35.6,34.5],[36,35.8],[36.2,36.7],[34.5,36.8],[32.5,36.1],[30.5,36.4],[29,36.6],[27.3,37.4],[26.3,38.6],[26.5,40],[26.2,40.6],[24,40.8],[22.6,40.4],[23.5,38],[22.3,36.5],[21.7,36.8],[21.2,38.4],[19.5,40],[19.5,41.8],[18.5,42.5],[16,43.5],[13.7,45.6],[12.3,45.3],[12.4,44.2],[13.6,43.5],[15.9,41.6],[18.5,40.2],[17,39],[16.6,38],[15.6,38],[16.1,39],[15.6,40.1],[14.3,40.6],[12.5,41.6],[11,42.5],[10.2,43.9],[8.8,44.4],[7.5,43.8],[6,43.1],[4,43.5],[3.1,43.1],[3.2,41.9],[0.8,41],[0,39.5],[-0.3,38.4],[-0.8,37.6],[-2.1,36.7],[-4.4,36.7],[-5.6,36],[-6.3,36.8],[-7.4,37.2],[-8.9,37]]},{id:'af',ll:[[-17.5,14.7],[-17,21],[-16,24],[-13,27.5],[-9.8,30],[-9.2,32.5],[-6.8,34],[-5.9,35.8],[-2,35.1],[1,36.5],[5,36.8],[9.8,37.3],[11,36.9],[10.2,35.2],[11.1,33.3],[15.2,32.3],[19,30.3],[20.1,32],[23,32.6],[25,31.7],[29,30.9],[32.2,31.3],[32.6,30],[33.5,28],[35.5,24],[37.2,21],[38.5,18],[39.6,15.5],[41.6,13.5],[43.3,12.4],[44,10.4],[47,11.1],[51.2,11.8],[51,10.4],[49.5,7],[47.8,4.5],[45,1.6],[42,-1],[40.2,-2.8],[39.3,-4.8],[38.8,-6.5],[39.6,-10],[40.5,-11],[40.6,-14.6],[37,-17.5],[35.4,-22],[35.5,-24],[32.9,-25.9],[32.5,-28.6],[31,-29.9],[28,-32.7],[25.6,-33.9],[22.5,-34],[20,-34.8],[18.4,-34],[17.9,-32.5],[16.5,-28.6],[15.2,-27],[14.4,-23],[12.8,-19],[11.8,-16.8],[12.2,-14.5],[13.6,-12.2],[13.2,-8.8],[12.3,-6],[11.8,-3.5],[9.5,-1],[9.4,1],[9.8,3.2],[8.9,4.5],[6,4.3],[4.3,6.3],[1.6,6.2],[-2,4.8],[-4.6,5.2],[-7.5,4.4],[-9.4,5.4],[-11.5,6.9],[-13.2,8.7],[-15,10.9],[-16.7,12.4]]},{id:'uk',ll:[[-5.7,50.1],[-3,50.6],[1.4,51.2],[1.7,52.7],[0.3,53.4],[-0.2,54.3],[-1.6,55.6],[-2,56.4],[-1.8,57.6],[-3.4,58.6],[-5,58.6],[-6.2,57.5],[-5.6,56.3],[-5,55],[-3.2,54.9],[-3.4,54],[-3,53.4],[-4.6,53.3],[-4.2,52.2],[-5.2,51.7],[-3.2,51.4],[-4.6,51]]},{id:'ie',ll:[[-6,52.2],[-6.2,53.5],[-5.6,54.6],[-6.4,55.2],[-7.4,55.4],[-8.5,54.5],[-10,54.2],[-9.6,53.2],[-10.2,51.9],[-9.6,51.5],[-8.2,51.8]]},{id:'is',ll:[[-22.5,63.9],[-24,65.5],[-22,66.4],[-16,66.5],[-14.5,65.3],[-14.6,64.4],[-18,63.4]]},{id:'jp',ll:[[129.6,33.3],[130.2,31.3],[131.4,31.5],[132,33],[133.5,33.4],[135.2,33.6],[136.8,34.3],[138.8,34.6],[140,35],[140.8,35.7],[141,38.2],[141.9,39.5],[141.4,41.4],[140,41.4],[139.9,40.3],[139.8,38.5],[138.8,37.8],[137.3,36.9],[136,36],[135.4,35.6],[133,35.5],[131.5,34.6],[130.9,34]]},{id:'oc',ll:[[113.5,-22],[114,-26.5],[115,-30],[115.7,-33.6],[115,-34.3],[117.9,-35.1],[123.5,-33.9],[126,-32.3],[131,-31.5],[134,-32.8],[135.6,-34.8],[137.6,-35.6],[138.5,-34.6],[139.6,-36.9],[141.5,-38.4],[144.9,-37.9],[146.4,-39.1],[150,-37.5],[150.8,-34.5],[152.5,-32.4],[153.6,-28.5],[153,-25],[150.8,-22.5],[149,-20.6],[146.3,-18.9],[145.4,-16],[145.3,-14.9],[143.5,-12.3],[142.5,-10.7],[141.6,-12.8],[141.6,-16],[140.6,-17.6],[139.3,-17.4],[137,-15.9],[135.8,-15],[136.8,-12.2],[135,-12],[132.6,-11.5],[131,-12.2],[129.5,-14.9],[128,-15.4],[126.5,-13.9],[124.5,-16.5],[122.2,-18.2],[121,-19.7],[118.5,-20.3],[116.7,-20.6],[114.6,-21.8]]},{id:'nz',ll:[[172.7,-34.4],[174.5,-36],[175.9,-37.5],[178.5,-37.7],[177.9,-39.2],[176.9,-39.6],[175.2,-41.6],[174.6,-41.2],[174.9,-39.9],[173.8,-39.3],[174.6,-38.1],[174.5,-37.3],[173.1,-35.3]]},{id:'idn',ll:[[105.2,-6.8],[106.8,-6.1],[108.5,-6.4],[110.5,-6.9],[112.6,-6.9],[114.6,-7.7],[114.4,-8.7],[111,-8.3],[108,-7.8],[105.5,-7]]},{id:'ph',ll:[[120.6,18.5],[122.2,18.5],[122,16.5],[121.6,14.2],[124,13.8],[124,12.5],[123.3,13],[121,13.6],[120.6,14.5],[119.8,16.2]]}]; +const LANDS_LL=[{id:'am',ll:[[-166,68],[-157,71.2],[-141,69.8],[-128,70],[-115,68.5],[-97,68],[-94,62],[-92.5,57.5],[-85,55.2],[-80,51.5],[-78.5,58],[-77,62],[-70,61],[-64.5,60],[-61.5,56.5],[-57,52],[-55.6,49.5],[-53,47],[-59,46.5],[-61,45.2],[-66,44.5],[-70,43.3],[-70,42],[-74,40.6],[-76,38],[-75.8,35.5],[-77.5,34.5],[-79,33],[-81,31],[-80.05,27],[-80.1,25.3],[-81.5,25],[-82.7,27.5],[-84,30],[-89,30.2],[-94,29.5],[-97,28],[-97.5,25],[-97.7,22],[-96,19],[-94,18.3],[-91,18.5],[-90.4,21],[-87,21.5],[-88,17],[-88.5,15.8],[-84,15.8],[-83.4,12],[-83.7,10.5],[-81.5,9],[-79.5,9.5],[-77.5,8.6],[-75,10.8],[-71.5,12.3],[-68,10.6],[-62,10.5],[-60,8],[-57,6],[-52,5],[-50,1.5],[-48,-1],[-44,-2.5],[-39,-3.5],[-35,-5.5],[-35,-9],[-37.5,-12.5],[-39,-15],[-39.7,-19],[-41,-22],[-44,-23],[-48,-26],[-48.6,-28.5],[-51,-31],[-53,-34],[-58,-34.5],[-57,-37],[-62,-39],[-65,-41],[-64,-43],[-67.5,-46],[-66,-48],[-69,-51],[-68.5,-53],[-70,-55],[-73,-53],[-75,-48],[-73.5,-43],[-73.5,-37],[-71.5,-32],[-71.3,-27],[-70.5,-20],[-71.5,-17],[-76,-14],[-78,-10],[-81,-6],[-80.5,-3],[-80,0],[-79,1.5],[-77.5,4],[-77.4,7.5],[-80,7.3],[-82.5,8.2],[-85.7,10],[-87,12.5],[-91,14],[-94,16],[-96.5,15.7],[-100,17],[-105.5,20],[-105.5,22.5],[-108,25.5],[-110.8,27.9],[-113,31.3],[-114.7,31.7],[-113.5,29],[-112,26.5],[-110,24],[-109.5,23],[-112,24.8],[-114,27.5],[-115.5,29.8],[-117,32.5],[-118.5,34],[-120.6,34.6],[-122.5,37.5],[-124,40.5],[-124.5,43],[-124,46.2],[-124.7,48.4],[-123,49],[-126,50.5],[-130,54.5],[-133,57.5],[-137,58.5],[-141,60],[-146,61],[-150,59.5],[-152,58.5],[-156,57.5],[-158,56.8],[-162,55.5],[-164.5,54.5],[-158,58.5],[-162,60],[-165,61.5],[-166,64],[-164,65.5]]},{id:'eu',ll:[[-9,39],[-9.5,43],[-8,43.7],[-1.8,43.4],[-1.2,46],[-2.5,47.3],[-4.5,48],[-1.6,48.6],[1.5,50.2],[3,51.2],[4.5,52.5],[5,53.4],[7,53.6],[8.6,54],[8.2,55.5],[8.1,57],[10.5,57.7],[10.5,56.5],[11.2,56],[12.6,56.1],[12.7,55.6],[12.1,54.9],[11,54.3],[14,54],[18.5,54.8],[21,55.3],[21,57],[24,57.5],[24,59.2],[28,59.5],[30,60],[28,60.5],[25,60.1],[22.5,60.3],[21.5,61.5],[21.5,63],[25,65],[25.5,65.6],[22,65.8],[20.5,63.5],[18,62.5],[17.4,61],[19,59.8],[18,59],[16.5,57],[16,56.2],[14.2,55.4],[13,55.4],[12.9,56.5],[11.5,58],[10.5,59.3],[8,58],[5.5,58.5],[5,60],[5,62],[7,63],[10,64],[12.5,66],[15,68.5],[18,69.8],[21.5,70.2],[26,71],[30,70],[33,69.3],[41,67],[44,68.5],[53,68.5],[58,69],[68,69],[69,72.8],[73,72.5],[80,73.5],[87,74.8],[100,76],[104,77.7],[112,74],[113.5,73.5],[127,73.5],[132,71.5],[140,72.5],[150,71.5],[160,70],[170,70],[180,69],[190,66.5],[186,64.5],[182,65],[178,62.5],[173,61],[170,60],[164,60],[164,57],[162,55],[159,52],[156.7,51],[156,55.5],[157,58],[155,59.5],[150,59.5],[143,59.3],[137,54.5],[141,53],[140,48.5],[135,43.5],[131,42.7],[129.5,41],[129.4,37],[129.4,35.5],[127.5,34.6],[126.3,34.8],[126.5,37],[125,37.8],[124.5,39.7],[121.5,39],[121.7,40.8],[119,39.3],[117.8,38.5],[119,37.2],[122.5,37.3],[120.5,36],[119.2,35],[121,32],[121.9,30.8],[121.5,28],[119.5,25.5],[116.5,23],[114.3,22.1],[111,21.5],[109.7,20.5],[108.5,21.6],[106.5,20],[106,18],[108.5,15],[109.3,12],[107,10.5],[105,8.6],[104.8,10.3],[103,11],[100.9,12.6],[100,13.4],[99.3,10.5],[100.3,7],[101,6.8],[103.4,4],[104.3,1.4],[103.6,1.25],[101.3,2.8],[100.2,5.3],[98.3,8],[98.6,13],[97.7,16.5],[94.4,16.2],[94.2,18.8],[92.3,20.6],[91.8,22.6],[90,22],[88.3,21.6],[86.9,20.6],[85,19.5],[82.3,16.6],[80.3,15.8],[80.3,13.5],[79.8,10.3],[78.3,8.9],[77.5,8.1],[76.5,8.9],[75.8,11.5],[74.8,12.9],[73.5,16],[72.8,19],[72.7,21.2],[70,22.5],[68.5,23.5],[66.6,25.4],[61.6,25.2],[57.3,25.8],[56.4,27.1],[54.7,26.5],[51.5,27.9],[50,30],[48,30],[48.4,28.5],[49.5,26.7],[50.8,24.8],[50.85,25.6],[51.2,26.15],[51.62,25.9],[51.62,24.6],[52.6,24.2],[54.3,24.6],[55.3,25.3],[55.9,25.75],[56.1,26.1],[56.35,26.38],[56.42,25.8],[56.38,25.0],[56.5,24.6],[57.8,23.8],[58.8,22.5],[59.8,22.4],[58.5,20.5],[57.7,19],[55.4,17.7],[52.2,15.7],[48.7,14],[45,12.8],[43.4,12.6],[42.7,15.7],[42.5,17.2],[41,19.5],[39.1,21.6],[38.4,23.6],[37,25.5],[35.2,28],[34.9,29.5],[34.3,27.8],[33,28.8],[32.6,30],[32.3,31.2],[34.2,31.3],[34.9,32.8],[35.6,34.5],[36,35.8],[36.2,36.7],[34.5,36.8],[32.5,36.1],[30.5,36.4],[29,36.6],[27.3,37.4],[26.3,38.6],[26.5,40],[26.2,40.6],[24,40.8],[22.6,40.4],[24.1,38.2],[24,37.6],[23.2,37.5],[22.3,36.5],[21.7,36.8],[21.2,38.4],[19.5,40],[19.5,41.8],[18.5,42.5],[16,43.5],[13.7,45.6],[12.3,45.3],[12.4,44.2],[13.6,43.5],[15.9,41.6],[18.5,40.2],[17,39],[16.6,38],[15.6,38],[15.3,37],[15.1,36.65],[12.4,37.8],[13.3,38.25],[15.55,38.3],[16.1,39],[15.6,40.1],[14.3,40.6],[12.5,41.6],[11,42.5],[10.2,43.9],[8.8,44.4],[7.5,43.8],[6,43.1],[4,43.5],[3.1,43.1],[3.2,41.9],[0.8,41],[0,39.5],[-0.3,38.4],[-0.8,37.6],[-2.1,36.7],[-4.4,36.7],[-5.6,36],[-6.3,36.8],[-7.4,37.2],[-8.9,37],[-8.8,38.4],[-9.5,38.6]]},{id:'af',ll:[[-17.5,14.7],[-17,21],[-16,24],[-13,27.5],[-9.8,30],[-9.2,32.5],[-6.8,34],[-5.9,35.8],[-2,35.1],[1,36.5],[5,36.8],[9.8,37.3],[11,36.9],[10.2,35.2],[11.1,33.3],[15.2,32.3],[19,30.3],[20.1,32],[23,32.6],[25,31.7],[29,30.9],[32.2,31.3],[32.6,30],[33.5,28],[35.5,24],[37.2,21],[38.5,18],[39.6,15.5],[41.6,13.5],[43.3,12.4],[44,10.4],[47,11.1],[51.2,11.8],[51,10.4],[49.5,7],[47.8,4.5],[45,1.6],[42,-1],[40.2,-2.8],[39.3,-4.8],[38.8,-6.5],[39.6,-10],[40.5,-11],[40.6,-14.6],[37,-17.5],[35.4,-22],[35.5,-24],[32.9,-25.9],[32.5,-28.6],[31,-29.9],[28,-32.7],[25.6,-33.9],[22.5,-34],[20,-34.8],[18.4,-34],[17.9,-32.5],[16.5,-28.6],[15.2,-27],[14.4,-23],[12.8,-19],[11.8,-16.8],[12.2,-14.5],[13.6,-12.2],[13.2,-8.8],[12.3,-6],[11.8,-3.5],[9.5,-1],[9.4,1],[9.8,3.2],[8.9,4.5],[6,4.3],[4.3,6.3],[1.6,6.2],[-2,4.8],[-4.6,5.2],[-7.5,4.4],[-9.4,5.4],[-11.5,6.9],[-13.2,8.7],[-15,10.9],[-16.7,12.4]]},{id:'uk',ll:[[-5.7,50.1],[-3,50.6],[1.4,51.2],[1.7,52.7],[0.3,53.4],[-0.2,54.3],[-1.6,55.6],[-2,56.4],[-1.8,57.6],[-3.4,58.6],[-5,58.6],[-6.2,57.5],[-5.6,56.3],[-5,55],[-3.2,54.9],[-3.4,54],[-3,53.4],[-4.6,53.3],[-4.2,52.2],[-5.2,51.7],[-3.2,51.4],[-4.6,51]]},{id:'ie',ll:[[-6,52.2],[-6.2,53.5],[-5.6,54.6],[-6.4,55.2],[-7.4,55.4],[-8.5,54.5],[-10,54.2],[-9.6,53.2],[-10.2,51.9],[-9.6,51.5],[-8.2,51.8]]},{id:'is',ll:[[-22.5,63.9],[-24,65.5],[-22,66.4],[-16,66.5],[-14.5,65.3],[-14.6,64.4],[-18,63.4]]},{id:'jp',ll:[[129.6,33.3],[130.2,31.3],[131.4,31.5],[132,33],[133.5,33.4],[135.2,33.6],[136.8,34.3],[138.8,34.6],[140,35],[140.8,35.7],[141,38.2],[141.9,39.5],[141.4,41.4],[140,41.4],[139.9,40.3],[139.8,38.5],[138.8,37.8],[137.3,36.9],[136,36],[135.4,35.6],[133,35.5],[131.5,34.6],[130.9,34]]},{id:'oc',ll:[[113.5,-22],[114,-26.5],[115,-30],[115.7,-33.6],[115,-34.3],[117.9,-35.1],[123.5,-33.9],[126,-32.3],[131,-31.5],[134,-32.8],[135.6,-34.8],[137.6,-35.6],[138.5,-34.6],[139.6,-36.9],[141.5,-38.4],[144.9,-37.9],[146.4,-39.1],[150,-37.5],[150.8,-34.5],[152.5,-32.4],[153.6,-28.5],[153,-25],[150.8,-22.5],[149,-20.6],[146.3,-18.9],[145.4,-16],[145.3,-14.9],[143.5,-12.3],[142.5,-10.7],[141.6,-12.8],[141.6,-16],[140.6,-17.6],[139.3,-17.4],[137,-15.9],[135.8,-15],[136.8,-12.2],[135,-12],[132.6,-11.5],[131,-12.2],[129.5,-14.9],[128,-15.4],[126.5,-13.9],[124.5,-16.5],[122.2,-18.2],[121,-19.7],[118.5,-20.3],[116.7,-20.6],[114.6,-21.8]]},{id:'nz',ll:[[172.7,-34.4],[174.5,-36],[175.9,-37.5],[178.5,-37.7],[177.9,-39.2],[176.9,-39.6],[175.2,-41.6],[174.6,-41.2],[174.9,-39.9],[173.8,-39.3],[174.6,-38.1],[174.5,-37.3],[173.1,-35.3]]},{id:'idn',ll:[[105.2,-6.8],[106.8,-6.1],[108.5,-6.4],[110.5,-6.9],[112.6,-6.9],[114.6,-7.7],[114.4,-8.7],[111,-8.3],[108,-7.8],[105.5,-7]]},{id:'ph',ll:[[120.6,18.5],[122.2,18.5],[122,16.5],[121.6,14.2],[124,13.8],[124,12.5],[123.3,13],[121,13.6],[120.6,14.5],[119.8,16.2]]}]; // South America is drawn as part of 'am' but counts as its own landmass: nothing crosses the Darién Gap. LANDS_LL.push({id:'lk',ll:[[79.9, 9.8], [80.6, 9.6], [81.4, 8.5], [81.9, 7.4], [81.6, 6.4], [80.6, 5.9], [80.0, 6.2], [79.75, 7.2], [79.75, 8.3]]},{id:'sa',hide:true,ll:[[-77.5, 8.6], [-75, 10.8], [-71.5, 12.3], [-68, 10.6], [-62, 10.5], [-60, 8], [-57, 6], [-52, 5], [-50, 1.5], [-48, -1], [-44, -2.5], [-39, -3.5], [-35, -5.5], [-35, -9], [-37.5, -12.5], [-39, -15], [-39.7, -19], [-41, -22], [-44, -23], [-48, -26], [-48.6, -28.5], [-51, -31], [-53, -34], [-58, -34.5], [-57, -37], [-62, -39], [-65, -41], [-64, -43], [-67.5, -46], [-66, -48], [-69, -51], [-68.5, -53], [-70, -55], [-73, -53], [-75, -48], [-73.5, -43], [-73.5, -37], [-71.5, -32], [-71.3, -27], [-70.5, -20], [-71.5, -17], [-76, -14], [-78, -10], [-81, -6], [-80.5, -3], [-80, 0], [-79, 1.5], [-77.5, 4], [-77.4, 7.5]]},{id:'tw',ll:[[121.5, 25.35], [122.05, 25.0], [121.85, 24.3], [121.4, 23.0], [120.85, 21.9], [120.6, 22.3], [120.15, 22.9], [120.1, 23.6], [120.55, 24.5], [121.0, 25.1]]}); const LANDS=LANDS_LL.map(l=>({id:l.id,hide:!!l.hide,pts:l.ll.map(q=>proj(q[0],q[1]))})); const DECOR=[[[-73,78],[-60,81.5],[-35,82.5],[-20,81.5],[-18,77],[-20,72],[-23,70],[-30,68],[-38,65.5],[-43,60],[-48,61],[-52,64.5],[-54,68],[-55,71],[-60,76],[-68,77]],[[-80,73.5],[-72,71.5],[-67,69.5],[-62,66.5],[-64,63],[-71,62.5],[-78,64],[-83,66],[-88,70],[-85,73]],[[-110,76],[-95,77],[-80,79],[-70,82],[-90,82.3],[-105,79]],[[-118,73],[-105,72],[-100,69.5],[-110,68.8],[-118,70]],[[140,41.5],[141.6,42.4],[143.3,42],[145.6,43.3],[144.5,44],[141.9,45.5],[141.4,43.4],[140,42.6]],[[120.1,23],[121,25.2],[121.9,25],[121.5,22.5],[120.8,21.9]],[[122,11],[125.5,11.5],[126.5,9.5],[126.2,6.5],[124,6.5],[122,7]],[[95.3,5.6],[98,4],[100.3,2],[103.8,-1],[106,-3],[106,-5.9],[104.5,-5.9],[102.3,-4],[100.3,-1],[97.5,2.4],[95.2,4]],[[109.6,2],[111,1.6],[113,3.2],[115.5,5.2],[117.2,6.9],[119,5],[118,2],[117.5,0.6],[116.2,-2.5],[116,-4],[114.5,-3.4],[111.7,-3],[110,-1.6],[109,0.5]],[[119,-5.5],[120.5,-1],[121.5,1],[125,1.5],[123,-1],[121.5,-4.5]],[[131,-1.2],[134,-0.8],[138,-1.6],[141,-2.6],[145,-4.3],[147.5,-6],[147.5,-8],[146,-8],[143.4,-9.1],[141,-9.1],[139,-8],[138,-8.5],[137.7,-5.6],[134,-4],[132,-2.8]],[[172.6,-40.5],[174.3,-41.7],[173,-43.5],[171.2,-44.5],[170.6,-45.9],[169.2,-46.6],[166.5,-46],[167,-45],[168.4,-44],[170.8,-42.6],[171.5,-41.7]],[[144.6,-40.7],[148.3,-40.9],[148,-43.2],[146,-43.5]],[[49.3,-12],[50.5,-15.5],[49.5,-17.5],[47.1,-24.9],[45,-25.5],[43.8,-23.6],[43.3,-21],[44.4,-16.2],[46.5,-15.7],[48,-13.5]],[[79.8,9.8],[81.9,7.5],[81.2,6.2],[80,6],[79.7,8.2]],[[-85,21.9],[-82,23.2],[-77.5,22.3],[-74.2,20.2],[-77.7,19.9],[-80.5,21.8]],[[-74.5,18.5],[-72,19.9],[-68.4,18.6],[-70,18.2]],[[12.4,38.1],[15.6,38.3],[15.1,36.7]],[[8.2,41],[9.8,41.1],[9.6,39.1],[8.4,39]],[[11,78],[17,80],[27,80],[20,77]],[[52,71],[56,74],[64,76.5],[68,77],[58,74],[54,71]],[[142,46],[143.5,49],[143,54],[142,53],[141.8,48]],[[108.7,19],[111,19.7],[110,18.2]]].map(poly=>poly.map(q=>proj(q[0],q[1]))); -const CITY_LL={"jed":[39.25,21.55],"ruh":[46.72,24.71],"doh":[51.45,25.28],"kyv":[30.52,50.45],"mel":[144.96, -37.81],"bne":[153.03, -27.47],"drw":[131.05,-12.46],"osa":[135.5, 34.69],"kul":[101.69, 3.14],"bkk":[100.5, 13.76],"sgn":[106.66, 10.76],"khi":[67.14,25.0],"dac":[90.41, 23.81],"cbo":[80.0, 6.95],"waw":[21.01, 52.23],"prg":[14.42, 50.08],"vie":[16.37, 48.21],"bud":[19.04, 47.5],"buh":[26.1, 44.43],"tll":[24.45,58.9],"ist":[28.98, 41.01],"for":[-38.54, -3.73],"rio":[-43.11,-22.57],"bue":[-58.38, -34.6],"scl":[-70.67, -33.45],"lim":[-76.85,-12.05],"bog":[-74.07, 4.71],"pan":[-79.52, 8.98],"del":[77.21, 28.61],"maa":[80.18,13.25],"blr":[77.59, 12.97],"hyd":[78.49, 17.39],"tpe":[121.56, 25.03],"auh":[54.37, 24.45],"fuj":[56.15,25.07],"cpt":[18.42, -33.92],"stg":[9.18,48.78],"ber":[13.4,52.52],"zrh":[8.54,47.37],"nbo":[36.82,-1.29],"cai":[31.24,30.04],"sea":[-122.33,47.61],"sjc":[-121.89,37.34],"lax":[-118.24,34.05],"dal":[-96.8,32.78],"chi":[-87.63,41.88],"ash":[-77.49,39.04],"nyc":[-74.0,40.71],"mia":[-80.19,25.76],"tor":[-79.38,43.65],"mtl":[-73.57,45.5],"mex":[-99.13,19.43],"sao":[-46.63,-23.55],"lon":[-0.13,51.51],"dub":[-6.26,53.35],"rek":[-21.94,64.15],"ams":[4.9,52.37],"fra":[8.68,50.11],"par":[2.35,48.86],"mrs":[5.37,43.3],"mad":[-3.7,40.42],"sto":[18.07,59.33],"osl":[10.75,59.91],"cph":[12.57,55.68],"hel":[24.94,60.17],"beg":[20.46,44.79],"sof":[23.32,42.7],"mos":[37.62,55.76],"lag":[3.38,6.52],"jnb":[28.05,-26.2],"dxb":[55.27,25.2],"bom":[72.88,19.08],"sin":[103.82,1.35],"jkt":[106.85,-6.2],"mnl":[120.98,14.6],"hkg":[114.17,22.32],"sha":[121.47,31.23],"pek":[116.4,39.9],"icn":[126.98,37.57],"tok":[139.69,35.69],"syd":[151.21,-33.87],"per":[115.86,-31.95],"akl":[174.76,-36.85]}; +const CITY_LL={"mil":[9.19,45.46],"rom":[12.5,41.9],"pmo":[13.36,38.12],"lis":[-9.14,38.72],"ath":[23.73,37.98],"atn":[-84.39,33.75],"den":[-104.99,39.74],"phx":[-112.07,33.45],"bos":[-71.06,42.36],"hou":[-95.37,29.76],"slc":[-111.89,40.76],"jed":[39.25,21.55],"ruh":[46.72,24.71],"doh":[51.45,25.28],"kyv":[30.52,50.45],"mel":[144.96, -37.81],"bne":[153.03, -27.47],"drw":[131.05,-12.46],"osa":[135.5, 34.69],"kul":[101.69, 3.14],"bkk":[100.5, 13.76],"sgn":[106.66, 10.76],"khi":[67.14,25.0],"dac":[90.41, 23.81],"cbo":[80.0, 6.95],"waw":[21.01, 52.23],"prg":[14.42, 50.08],"vie":[16.37, 48.21],"bud":[19.04, 47.5],"buh":[26.1, 44.43],"tll":[24.45,58.9],"ist":[28.98, 41.01],"for":[-38.54, -3.73],"rio":[-43.11,-22.57],"bue":[-58.38, -34.6],"scl":[-70.67, -33.45],"lim":[-76.85,-12.05],"bog":[-74.07, 4.71],"pan":[-79.52, 8.98],"del":[77.21, 28.61],"maa":[80.18,13.25],"blr":[77.59, 12.97],"hyd":[78.49, 17.39],"tpe":[121.56, 25.03],"auh":[54.37, 24.45],"fuj":[56.15,25.07],"cpt":[18.42, -33.92],"stg":[9.18,48.78],"ber":[13.4,52.52],"zrh":[8.54,47.37],"nbo":[36.82,-1.29],"cai":[31.24,30.04],"sea":[-122.33,47.61],"sjc":[-121.89,37.34],"lax":[-118.24,34.05],"dal":[-96.8,32.78],"chi":[-87.63,41.88],"ash":[-77.49,39.04],"nyc":[-74.0,40.71],"mia":[-80.19,25.76],"tor":[-79.38,43.65],"mtl":[-73.57,45.5],"mex":[-99.13,19.43],"sao":[-46.63,-23.55],"lon":[-0.13,51.51],"dub":[-6.26,53.35],"rek":[-21.94,64.15],"ams":[4.9,52.37],"fra":[8.68,50.11],"par":[2.35,48.86],"mrs":[5.37,43.3],"mad":[-3.7,40.42],"sto":[18.07,59.33],"osl":[10.75,59.91],"cph":[12.57,55.68],"hel":[24.94,60.17],"beg":[20.46,44.79],"sof":[23.32,42.7],"mos":[37.62,55.76],"lag":[3.38,6.52],"jnb":[28.05,-26.2],"dxb":[55.27,25.2],"bom":[72.88,19.08],"sin":[103.82,1.35],"jkt":[106.85,-6.2],"mnl":[120.98,14.6],"hkg":[114.17,22.32],"sha":[121.47,31.23],"pek":[116.4,39.9],"icn":[126.98,37.57],"tok":[139.69,35.69],"syd":[151.21,-33.87],"per":[115.86,-31.95],"akl":[174.76,-36.85]}; const CITIES=[ {id:'sea',name:'Seattle',x:205,y:245,land:'am',reg:'AM',P:300,ix:'Sea-IX',dc:'Westin-ish Carrier Hotel'}, {id:'sjc',name:'San Jose',x:240,y:345,land:'am',reg:'AM',P:500,ix:'Silly-Con Valley IX',dc:'Equinox SV-ish'}, @@ -636,9 +636,20 @@ const CITIES=[ {id:'jed',name:'Jeddah',x:0,y:0,land:'eu',reg:'AS',P:300,saudi:true,gcc:true,ix:'',dc:'Red Sea Landing Palace',note:'Saudi Arabia’s Red Sea cable hub. More and more of the cables between Europe, Africa and Asia stop here instead of in Egypt.'}, {id:'ruh',name:'Riyadh',x:0,y:0,land:'eu',reg:'AS',P:600,saudi:true,gcc:true,ix:'Kabsa-IX',dc:'Desert Megaproject DC',note:'The capital, building AI campuses at gigawatt scale. Data about Saudi users has to stay in the Kingdom, and every POP needs a local telecom licence.'}, {id:'doh',name:'Doha',x:0,y:0,land:'eu',reg:'AS',P:150,arpu:1.5,qa:true,ix:'Pearl-IX',dc:'Air-cooled Stadium DC',note:'Small, rich and very well connected, as long as the neighbours are on speaking terms. Its only land border is with Saudi Arabia.'}, + {id:'mil',name:'Milan',x:0,y:0,land:'eu',reg:'EU',P:450,ix:'MIX-and-Match',dc:'Caldera-ish Campus',note:'Italy’s digital capital. Fashion-week traffic, an espresso-powered NOC and more exchanges than you would expect.'}, + {id:'rom',name:'Rome',x:0,y:0,land:'eu',reg:'EU',P:450,ix:'Carbonara-IX',dc:'Colosseum-adjacent Colo',note:'All roads lead to Rome. Most packets still go via Milan.'}, + {id:'pmo',name:'Palermo',x:0,y:0,land:'eu',reg:'EU',P:60,ix:'Cannoli-IX',dc:'Sicily Hub-ish',note:'A small city on a big crossroads. Cables from Asia, Africa and the Middle East land here to skip the long way round.'}, + {id:'lis',name:'Lisbon',x:0,y:0,land:'eu',reg:'EU',P:300,ix:'Pastel-de-Nata-IX',dc:'Seven Hills Colo',note:'Europe’s new Atlantic gateway. Cables to Brazil, Africa and the US land down the coast in Sines.'}, + {id:'ath',name:'Athens',x:0,y:0,land:'eu',reg:'EU',P:350,ix:'Souvlaki-IX',dc:'Acropolis-view DC',note:'Ancient city, brand new cables. Greece wants to be the eastern Mediterranean’s landing hub.'}, + {id:'atn',name:'Atlanta',x:0,y:0,land:'am',reg:'AM',P:450,ix:'Peach-IX',dc:'56 Marietta-ish',note:'The Southeast’s carrier hotel. Busiest airport, busiest peering south of Ashburn.'}, + {id:'den',name:'Denver',x:0,y:0,land:'am',reg:'AM',P:250,ix:'Mile-High-IX',dc:'Thin Air DC',note:'A mile up and halfway between the coasts, so every cross-country route stops here for a breather.'}, + {id:'phx',name:'Phoenix',x:0,y:0,land:'am',reg:'AM',P:300,ix:'Cactus-IX',dc:'Dry Heat Campus',note:'Cheap land, cheap power and 48 °C summers. Hyperscalers love it. Chillers do not.'}, + {id:'bos',name:'Boston',x:0,y:0,land:'am',reg:'AM',P:350,ix:'Chowder-IX',dc:'One Summer Street-ish',note:'Universities, biotech and a carrier hotel that has outlived most of its carriers.'}, + {id:'hou',name:'Houston',x:0,y:0,land:'am',reg:'AM',P:450,ix:'Rodeo-IX',dc:'Hurricane-hardened DC',note:'Oil, gas and hurricanes. The generators here are sized for a week, and they have needed it.'}, + {id:'slc',name:'Salt Lake City',x:0,y:0,land:'am',reg:'AM',P:150,ix:'Fry-Sauce-IX',dc:'Great Salt Lake DC',note:'Cheap power, dry air and a surprising number of very quiet data centers.'}, ]; // Display-only nudges for cities that sit on top of each other at map scale; distances still use real lon/lat. -const CITY_NUDGE={stg:[30,6],fra:[-8,-8],auh:[-5,6],dxb:[9,-7],fuj:[8,15],rio:[14,-16],tll:[-4,22],osa:[-10,6],khi:[-2,-6]}; +const CITY_NUDGE={stg:[30,6],fra:[-8,-8],auh:[-5,6],dxb:[9,-7],fuj:[8,15],rio:[14,-16],tll:[-4,22],osa:[-10,6],khi:[-2,-6],hou:[0,6],dal:[0,-4]}; for(const c of CITIES){const q=CITY_LL[c.id];if(q){c.lon=q[0];c.lat=q[1];const pt=proj(q[0],q[1]),n=CITY_NUDGE[c.id]||[0,0];c.x=pt[0]+n[0];c.y=pt[1]+n[1];}} const CITY=Object.fromEntries(CITIES.map(c=>[c.id,c])); const CABLES=[ @@ -648,11 +659,11 @@ const CABLES=[ {"id":"amitie","name":"Amitié-ish","price":0.9,"age":"new","blurb":"A friendly cable with French manners.","pairs":[["nyc","lon",[[-70,41.5],[-50,46],[-25,49],[-8,50.3]]],["nyc","par",[[-70,41.3],[-50,45],[-25,47.5],[-5,47.6]]]]}, {"id":"hibx","name":"Hibernia Express-o","price":1.7,"age":"mid","blurb":"The straightest line across the Atlantic. Traders pay double to save a few milliseconds.","pairs":[["nyc","lon",[[-68,42],[-55,46.5],[-30,52.5],[-12,52.5]]]],"lat":0.9}, {"id":"tat","name":"TAT-14 Retirement Home","price":1.3,"age":"old","blurb":"Laid last century. Cuts often, costs more, still somehow running.","pairs":[["nyc","ams",[[-70,41],[-45,48],[-20,52],[0,54],[3,53.5]]]]}, - {"id":"ella","name":"EllaLink-ing","price":1.0,"age":"new","blurb":"Brazil straight to Iberia, skipping the US entirely.","pairs":[["for","mad",[[-37,-2.2],[-32,5],[-22,20],[-14,33],[-10,37.5]]],["sao","mad",[[-44,-24.5],[-38,-14],[-34,-6],[-30,5],[-22,20],[-14,33],[-10,37.5]]]]}, + {"id":"ella","name":"EllaLink-ing","price":1.0,"age":"new","blurb":"Brazil straight to Iberia, skipping the US entirely.","pairs":[["for","mad",[[-37,-2.2],[-32,5],[-22,20],[-14,33],[-10,37.5]]],["sao","mad",[[-44,-24.5],[-38,-14],[-34,-6],[-30,5],[-22,20],[-14,33],[-10,37.5]]],["for","lis",[[-37,-2.2],[-32,5],[-22,20],[-14,33],[-9.6,37.9]]]]}, {"id":"sacs","name":"SACS-y Cable","price":1.0,"age":"mid","blurb":"South Atlantic, cool and confident.","pairs":[["for","lag",[[-36,-3],[-20,0],[0,3]]],["sao","lag",[[-44,-24.5],[-35,-10],[-15,-3],[0,2],[3,5.5]]]]}, {"id":"col3","name":"Columbus III-and-a-half","price":1.4,"age":"old","blurb":"Discovered the Atlantic again. Old, pricey and fragile.","pairs":[["mia","mad",[[-79,26],[-60,30],[-30,35],[-10,36.5]]]]}, {"id":"twoaf","name":"2Africa-n-Back","price":0.75,"age":"new","blurb":"All the way around Africa and back. Cheapest capacity on the map.","pairs":[["lon","lag",[[-6,49],[-12,40],[-20,20],[-18,8],[-5,3],[3,5.5]]],["jnb","mrs",[[32,-30],[40,-20],[45,-5],[52,10],[45,12.3],[44,12.4],[41,15.1],[38,21.1],[35,26.1],[33,29.6],[32.4,31.3],[30,32.1],[20,34.1],[12,37.6],[6,42.5]]],["mrs","bom",[[6,42.5],[12,37.6],[20,34.1],[30,32.1],[32.4,31.3],[33,29.6],[35,26.1],[38,21.1],[41,15.1],[44,12.4],[52,13],[62,18],[70,19]]]]}, - {"id":"equi","name":"Equi-yes","price":0.8,"age":"new","blurb":"Always agrees with you. Iberia to West Africa.","pairs":[["lag","cpt",[[4,3],[6,-5],[10,-20],[16,-33]]],["mad","lag",[[-10,38],[-15,28],[-18,15],[-14,5],[-2,3],[3,5.8]]]]}, + {"id":"equi","name":"Equi-yes","price":0.8,"age":"new","blurb":"Always agrees with you. Iberia to West Africa.","pairs":[["lag","cpt",[[4,3],[6,-5],[10,-20],[16,-33]]],["mad","lag",[[-10,38],[-15,28],[-18,15],[-14,5],[-2,3],[3,5.8]]],["lis","lag",[[-9.6,37.9],[-15,28],[-18,15],[-14,5],[-2,3],[3,5.8]]]]}, {"id":"smw6","name":"SEE-ME-WAVE 6","price":0.95,"age":"new","blurb":"Sixth in a long-running series. Europe to India to Singapore.","pairs":[["mrs","bom",[[6.4,42.74],[12.4,37.84],[20.4,34.34],[30.4,32.34],[32.8,31.54],[33.4,29.84],[35.4,26.34],[38.4,21.34],[41.4,15.34],[44.4,12.64],[52,13.4],[62,18.4],[70,19.4]]],["bom","sin",[[72,17],[76,8],[80.5,5],[90,5],[96,5.5],[100,4],[103,1.5]]],["mrs","sin",[[6.4,42.74],[12.4,37.84],[20.4,34.34],[30.4,32.34],[32.8,31.54],[33.4,29.84],[35.4,26.34],[38.4,21.34],[41.4,15.34],[44.4,12.64],[52,12.8],[62,12.5],[75,6.8],[80.5,5.2],[92,5.8],[97,5.8],[100.5,4],[103,1.7]]]]}, {"id":"peace","name":"PEACE-out","price":0.85,"age":"new","blurb":"Marseille to Singapore, then it leaves the party.","pairs":[["mrs","sin",[[5.6,42.26],[11.6,37.36],[19.6,33.86],[29.6,31.860000000000003],[32.0,31.060000000000002],[32.6,29.360000000000003],[34.6,25.860000000000003],[37.6,20.860000000000003],[40.6,14.86],[43.6,12.16],[52,12.2],[62,11.8],[75,6.3],[80.5,4.6],[92,5.2],[97,5.3],[100.5,3.6],[103,1.4]]]]}, {"id":"aae","name":"AAE-1-ish","price":1.0,"age":"mid","blurb":"Asia, Africa, Europe, and one more thing.","pairs":[["khi","sin",[[66,22],[70,12],[78,5.5],[90,5.5],[97,6],[100,3.6],[102.6,2.1],[103.7,1.3]]],["mrs","hkg",[[6.8,42.98],[12.8,38.08],[20.8,34.58],[30.8,32.58],[33.199999999999996,31.78],[33.8,30.080000000000002],[35.8,26.580000000000002],[38.8,21.580000000000002],[41.8,15.58],[44.8,12.88],[52,11.8],[62,11.4],[75,6],[80.5,4.4],[92,5],[97,5],[100.5,3.3],[104.5,1.5],[107,5],[110,10],[113,18],[114.2,21.8]]],["sin","hkg",[[104.5,1.5],[108,6],[111,12],[114,20],[114.2,22]]]]}, @@ -709,7 +720,12 @@ const CABLES=[ {"id":"imewe","name":"I-ME-WE-Us","price":1.05,"age":"mid","blurb":"India, the Middle East and Western Europe, all on one cable. Lands in Cairo on the way.","pairs":[["cai","fuj",[[32.6,29.9],[34.4,27.2],[37.5,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[55,15.8],[59.4,21.8],[57.5,24.3]]],["cai","bom",[[32.6,29.9],[34.4,27.2],[37.5,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[60,15],[68,17.5]]]]}, {"id":"jedx","name":"Jeddah Express-ish","price":0.95,"age":"new","blurb":"New cables increasingly land in Jeddah instead of Egypt. This one heads for India and Singapore.","pairs":[["jed","bom",[[38.6,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[60,15],[68,17.5]]],["jed","sin",[[38.6,22.5],[41.5,15.5],[43.4,12.4],[52,11],[70,6],[80,5.2],[92,5.5],[97,6],[100,3.6],[102.6,2.1],[103.7,1.3]]]]}, {"id":"rsea","name":"Red Sea Shortcut","price":0.9,"age":"mid","blurb":"A quick hop across the Red Sea between Egypt and Saudi Arabia.","pairs":[["cai","jed",[[32.6,29.9],[34.6,27],[37.2,23.6]]]]}, - {"id":"qgulf","name":"Gulf Bridge-ish Spur","price":1.0,"age":"mid","blurb":"Connects Doha to the rest of the Gulf, by sea, which is handy when the land border is closed.","pairs":[["doh","fuj",[[52.5,26.2],[55,26.4],[56.6,26],[56.9,25.3]]],["doh","bom",[[52.5,26.2],[55,26.4],[57,25.5],[60,23],[66,21],[71,19]]]]} + {"id":"qgulf","name":"Gulf Bridge-ish Spur","price":1.0,"age":"mid","blurb":"Connects Doha to the rest of the Gulf, by sea, which is handy when the land border is closed.","pairs":[["doh","fuj",[[52.5,26.2],[55,26.4],[56.6,26],[56.9,25.3]]],["doh","bom",[[52.5,26.2],[55,26.4],[57,25.5],[60,23],[66,21],[71,19]]]]}, + {"id":"nuvem","name":"Nuvem-ish","price":0.85,"age":"new","blurb":"Portugal to the US Southeast via Bermuda. Means cloud in Portuguese, and is owned by one.","pairs":[["lis","atn",[[-9.6,37.9],[-30,35],[-64.8,32.3],[-78.9,33.7]]]]}, + {"id":"blue","name":"Feeling Blue-ish","price":0.85,"age":"new","blurb":"Genoa to Sicily and on to Athens, laid by a search giant that got tired of renting.","pairs":[["mil","pmo",[[8.9,44.2],[9.4,42.5],[11.2,39.5],[12.9,38.4]]],["pmo","ath",[[13.6,38.3],[15.4,37.2],[19,36.8],[22.6,36.2],[23.6,37.6]]]]}, + {"id":"cannoli","name":"Sicilian Spaghetti Junction","price":0.9,"age":"mid","blurb":"Palermo to Marseille and Alexandria. Every Europe–Asia shortcut wants a stop in Sicily.","pairs":[["pmo","mrs",[[12.9,38.4],[9.5,40],[7.4,42.6],[5.4,43.1]]],["pmo","cai",[[13.6,37.8],[15.5,35.6],[22,33.4],[29.9,31.4]]]]}, + {"id":"ouzo","name":"Ouzo Express","price":0.9,"age":"new","blurb":"Athens to Alexandria, and up the Dardanelles to Istanbul. Opa!","pairs":[["ath","cai",[[24,37.5],[25.2,35.5],[28,33],[29.9,31.4]]],["ath","ist",[[24.3,38.5],[25.6,39.9],[26.5,40.3],[28.2,40.8]]]]}, + {"id":"tea","name":"Boston Tea Party Line","price":0.9,"age":"mid","blurb":"Boston to Dublin. Nobody has thrown it into the harbour yet.","pairs":[["bos","dub",[[-69.5,42.2],[-60,44],[-40,50],[-15,52.4],[-8,53]]]]}, ]; const CAB=Object.fromEntries(CABLES.map(c=>[c.id,c])); const CABLE_PAIRS=CABLES.flatMap(c=>c.pairs.map(([a,b,mid])=>{const A=CITY[a],B=CITY[b];const near=(x,ref)=>x+W*Math.round((ref-x)/W); @@ -722,24 +738,24 @@ function cablePair(cid,a,b){const c=CABLE_PAIRS.find(x=>x.cid===cid&&((x.a===a&& const ALLC=CITIES.filter(c=>!c.cn&&!c.ru&&!c.ixOnly).map(c=>c.id); const ruCity=c=>!!CITY[c].ru; const cnCity=c=>!!CITY[c].cn; -const BIGC=['ruh','jed','doh','kyv','mel','bne','osa','kul','bkk','sgn','khi','dac','waw','prg','vie','bud','buh','ist','rio','bue','scl','bog','lim','del','maa','blr','hyd','tpe','cpt','auh','ber','zrh','nbo','cai','jkt','mnl','per','akl','dub','lax','tor','mex','dxb','cph','icn','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mrs','mad','sto','bom','sin','hkg','tok','syd','jnb','lag']; -const MIDC=['mel','osa','kul','bkk','waw','vie','ist','rio','bue','scl','bog','del','maa','blr','tpe','auh','ber','zrh','jkt','mnl','dub','lax','tor','dxb','icn','sjc','ash','nyc','chi','dal','mia','lon','ams','fra','par','mad','sin','hkg','tok','syd','bom','sao']; +const BIGC=['mil','rom','lis','ath','atn','den','phx','bos','hou','ruh','jed','doh','kyv','mel','bne','osa','kul','bkk','sgn','khi','dac','waw','prg','vie','bud','buh','ist','rio','bue','scl','bog','lim','del','maa','blr','hyd','tpe','cpt','auh','ber','zrh','nbo','cai','jkt','mnl','per','akl','dub','lax','tor','mex','dxb','cph','icn','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mrs','mad','sto','bom','sin','hkg','tok','syd','jnb','lag']; +const MIDC=['mil','lis','atn','den','phx','bos','hou','mel','osa','kul','bkk','waw','vie','ist','rio','bue','scl','bog','del','maa','blr','tpe','auh','ber','zrh','jkt','mnl','dub','lax','tor','dxb','icn','sjc','ash','nyc','chi','dal','mia','lon','ams','fra','par','mad','sin','hkg','tok','syd','bom','sao']; /* ================= NETWORKS ================= */ const NETS=[ - {id:'lvl',name:'Level Tree',asn:3535,type:'t1',pol:'restrictive',share:.07,price:9,col:'#7B61FF',pops:['ber','zrh','dub','cph','osl','tor','lax','mex','mtl','sea','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mad','rio','bue','scl','bog','lim','pan','waw','prg','vie','bud','buh','ist'],ix:[],blurb:'Grew from a seedling into a global backbone. Leaves no route behind.'}, - {id:'ntt',name:'Not That Telecom',asn:2941,type:'t1',pol:'restrictive',share:.06,price:8,col:'#4B3FC4',pops:['jkt','mnl','per','lax','dxb','icn','sea','sjc','dal','ash','nyc','lon','ams','fra','sin','hkg','tok','syd','tpe','del','maa','blr','hyd','osa','kul','bkk','sgn'],ix:[],blurb:'Huge in Asia. "Which telecom?" "Not that one."'}, - {id:'tly',name:'Tell-Ya Carrier',asn:1229,type:'t1',pol:'restrictive',share:.05,price:8,col:'#9D4EDD',pops:['ber','osl','cph','hel','beg','sof','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','mrs','hkg','sin','tpe','tll','waw','vie','bud','buh','prg','kyv'],ix:[],blurb:'Nordic backbone that tells you exactly where your packets went.'}, - {id:'cog',name:'Cogentle',asn:714,type:'t1',pol:'restrictive',share:.04,price:3,col:'#B35CF0',pops:['ber','zrh','dub','hel','sof','beg','tor','lax','mex','cph','icn','sea','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mad','mrs','sto','sin','hkg','tok','rio','bue','scl','bog','lim','osa','waw','prg','vie','bud','buh','ist','kyv'],ix:[],blurb:'Cheapest transit on the map. Famously gentle, except during peering spats.'}, - {id:'tat',name:'Ta-Ta Comms',asn:6543,type:'t1',pol:'restrictive',share:.04,price:9,col:'#6A4C93',pops:['nbo','cai','jkt','dxb','nyc','ash','lon','fra','mrs','lag','jnb','bom','sin','hkg','tok','del','maa','blr','hyd','cpt','fuj','auh','tpe','khi','dac','cbo','kul','bkk','jed','ruh','doh'],ix:[],blurb:'Waves goodbye to latency across the Indian Ocean.'}, - {id:'drz',name:'Drizzle Electric',asn:9369,type:'t2',pol:'open',share:.04,price:4,col:'#1E90FF',pops:['ber','zrh','nbo','akl','per','jkt','mnl','dub','rek','tor','mtl','lax','mex','sof','osl','icn','sea','sjc','dal','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','hkg','sin','tok','syd','jnb','for','rio','bue','scl','lim','bog','pan','del','maa','blr','hyd','tpe','auh','cpt','mel','bne','osa','kul','bkk','sgn','khi','dac','cbo','waw','prg','vie','bud','buh','tll','ist','kyv','jed','ruh','doh'],ix:'ALL',blurb:'Will peer with anyone, anywhere. Rumored to mail out IPv6 cakes.'}, + {id:'lvl',name:'Level Tree',asn:3535,type:'t1',pol:'restrictive',share:.07,price:9,col:'#7B61FF',pops:['mil','rom','lis','ath','atn','den','phx','bos','hou','slc','ber','zrh','dub','cph','osl','tor','lax','mex','mtl','sea','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mad','rio','bue','scl','bog','lim','pan','waw','prg','vie','bud','buh','ist'],ix:[],blurb:'Grew from a seedling into a global backbone. Leaves no route behind.'}, + {id:'ntt',name:'Not That Telecom',asn:2941,type:'t1',pol:'restrictive',share:.06,price:8,col:'#4B3FC4',pops:['mil','atn','den','bos','hou','phx','jkt','mnl','per','lax','dxb','icn','sea','sjc','dal','ash','nyc','lon','ams','fra','sin','hkg','tok','syd','tpe','del','maa','blr','hyd','osa','kul','bkk','sgn'],ix:[],blurb:'Huge in Asia. "Which telecom?" "Not that one."'}, + {id:'tly',name:'Tell-Ya Carrier',asn:1229,type:'t1',pol:'restrictive',share:.05,price:8,col:'#9D4EDD',pops:['mil','rom','pmo','ath','ber','osl','cph','hel','beg','sof','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','mrs','hkg','sin','tpe','tll','waw','vie','bud','buh','prg','kyv'],ix:[],blurb:'Nordic backbone that tells you exactly where your packets went.'}, + {id:'cog',name:'Cogentle',asn:714,type:'t1',pol:'restrictive',share:.04,price:3,col:'#B35CF0',pops:['mil','rom','lis','ath','atn','den','phx','bos','hou','slc','ber','zrh','dub','hel','sof','beg','tor','lax','mex','cph','icn','sea','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mad','mrs','sto','sin','hkg','tok','rio','bue','scl','bog','lim','osa','waw','prg','vie','bud','buh','ist','kyv'],ix:[],blurb:'Cheapest transit on the map. Famously gentle, except during peering spats.'}, + {id:'tat',name:'Ta-Ta Comms',asn:6543,type:'t1',pol:'restrictive',share:.04,price:9,col:'#6A4C93',pops:['mil','pmo','lis','nbo','cai','jkt','dxb','nyc','ash','lon','fra','mrs','lag','jnb','bom','sin','hkg','tok','del','maa','blr','hyd','cpt','fuj','auh','tpe','khi','dac','cbo','kul','bkk','jed','ruh','doh'],ix:[],blurb:'Waves goodbye to latency across the Indian Ocean.'}, + {id:'drz',name:'Drizzle Electric',asn:9369,type:'t2',pol:'open',share:.04,price:4,col:'#1E90FF',pops:['mil','rom','pmo','lis','ath','atn','den','phx','bos','hou','slc','ber','zrh','nbo','akl','per','jkt','mnl','dub','rek','tor','mtl','lax','mex','sof','osl','icn','sea','sjc','dal','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','hkg','sin','tok','syd','jnb','for','rio','bue','scl','lim','bog','pan','del','maa','blr','hyd','tpe','auh','cpt','mel','bne','osa','kul','bkk','sgn','khi','dac','cbo','waw','prg','vie','bud','buh','tll','ist','kyv','jed','ruh','doh'],ix:'ALL',blurb:'Will peer with anyone, anywhere. Rumored to mail out IPv6 cakes.'}, {id:'tng',name:'Tangerine Telecom',asn:5115,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:6,col:'#FF8C42',pops:['cai','nbo','dxb','par','mrs','mad','lon','ams','lag','jnb','waw','buh'],ix:['par','mrs','mad','lon','ams','lag','jnb','waw'],blurb:'Juicy reach into Europe and Africa.'}, {id:'sgt',name:'SingTell',asn:7474,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:7,col:'#00A6A6',pops:['jkt','mnl','per','akl','icn','sin','hkg','tok','syd','bom','tpe','maa','kul','bkk','sgn','mel'],ix:['sin','hkg','tok','syd','bom','tpe','maa','kul','bkk'],blurb:'Sings your packets across Asia-Pacific.'}, - {id:'vdp',name:'Voda-Phony',asn:1373,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:6,col:'#E63946',pops:['nbo','cai','ber','dub','dxb','lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa','ist','prg','bud','buh','doh'],ix:['lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa'],blurb:'Mobile giant. The signal is real, the name is not.'}, + {id:'vdp',name:'Voda-Phony',asn:1373,type:'t2',pol:'paid',paidFee:8000,share:.03,price:6,col:'#E63946',pops:['mil','rom','lis','ath','nbo','cai','ber','dub','dxb','lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa','ist','prg','bud','buh','doh'],ix:[],blurb:'Ended free peering across Europe and handed it to Inter.Clink, its “interconnection partner”, who will happily sell you a direct connection. Paid peering only, over a PNI. Ring ring, it’s the invoice.'}, {id:'ctc',name:'China Telecomet',asn:4314,type:'t2',pol:'restrictive',share:.02,price:22,premium:2.5,cn:true,col:'#0B5CAD',pops:['pek','sha','hkg','sin','tok','lon','fra','nyc','sjc'],ix:[],blurb:'The biggest network in China. Its CN-Too premium route skips the congested border, for a price.'}, {id:'cun',name:'China Unicorn',asn:4837,type:'t2',pol:'restrictive',share:.015,price:16,cn:true,col:'#D7000F',pops:['pek','sha','hkg','fra','sjc','lon'],ix:[],blurb:'Number two in China, with a horn for every backbone.'}, {id:'cmb',name:'China Moble',asn:9880,type:'eye',pol:'paid',paidFee:12000,share:.01,cn:true,col:'#0085CA',pops:['pek','sha','hkg'],ix:[],blurb:'The largest mobile network on Earth. Paid peering only.'}, - {id:'cmc',name:'Comecast',asn:7227,type:'eye',pol:'selective',minIx:10,minPni:30,share:.03,col:'#2C7A7B',pops:['ash','nyc','chi','sjc','sea','mia'],ix:['ash','nyc','chi','sjc','sea'],blurb:'Huge eyeball network. Come for the broadband, stay because there is no other choice.'}, + {id:'cmc',name:'Comecast',asn:7227,type:'eye',pol:'selective',minIx:10,minPni:30,share:.03,col:'#2C7A7B',pops:['atn','den','bos','hou','phx','slc','ash','nyc','chi','sjc','sea','mia'],ix:['atn','den','bos','ash','nyc','chi','sjc','sea'],blurb:'Huge eyeball network. Come for the broadband, stay because there is no other choice.'}, {id:'dtk',name:'Doitsche Telekomm',asn:3203,type:'eye',pol:'paid',paidFee:9000,share:.03,col:'#E20074',pops:['fra','ams','lon'],ix:[],blurb:'Pink eyeball giant. Peering is available... for a monthly fee.'}, {id:'nfx',name:'NetChill',asn:2906,type:'cdn',pol:'selective',minIx:5,minPni:30,share:.15,cache:{name:'Open Couch',min:12},col:'#C8102E',pops:ALLC,ix:'ALL',blurb:'Streams 40% of evening traffic. Hands out free caches if you send enough eyeballs.'}, {id:'ggl',name:'Goggle',asn:15961,type:'cdn',pol:'selective',minIx:5,minPni:30,share:.13,cache:{name:'Goggle Global Cache',min:15},col:'#3A7BEA',pops:ALLC,ix:'ALL',blurb:'Search, video and goggles. Mostly goggles.'}, @@ -785,13 +801,121 @@ NETS.push( {id:'vtl',name:'Viet-tell',asn:7525,type:'t2',pol:'selective',minIx:10,minPni:30,share:.005,price:7,col:'#EE0033',pops:['sgn','hkg','sin'],ix:['sgn'],blurb:'Vietnam’s giant. Will tell you which subsea cable is broken this week.'}, {id:'ptc',name:'PTC-hell',asn:17577,type:'t2',pol:'selective',minIx:10,minPni:30,share:.004,price:8,col:'#00843D',pops:['khi','dxb'],ix:['khi'],blurb:'Pakistan’s incumbent. Every session comes with a firewall rule.'}, {id:'tmy',name:'Telekom Ma-lazy-sia',asn:4877,type:'t2',pol:'selective',minIx:10,minPni:30,share:.004,price:6,col:'#1F2A6B',pops:['kul','sin'],ix:['kul'],blurb:'Malaysia’s incumbent. In no hurry whatsoever.'}, - {id:'ttk',name:'Türk Tele-komik',asn:9211,type:'t2',pol:'selective',minIx:10,minPni:30,share:.008,price:6,col:'#1D3F8F',pops:['ist','fra','sof','lon'],ix:['ist'],blurb:'Bridges Europe and Asia, and occasionally your BGP table.'}, + {id:'ttk',name:'Türk Tele-komik',asn:9211,type:'t2',pol:'selective',minIx:10,minPni:30,share:.008,price:6,col:'#1D3F8F',pops:['ath','ist','fra','sof','lon'],ix:['ist'],blurb:'Bridges Europe and Asia, and occasionally your BGP table.'}, {id:'dgi',name:'Digi-tally Cheap',asn:8798,type:'eye',pol:'open',share:.006,col:'#2A5CAA',pops:['buh','bud','mad'],ix:['buh','bud','mad'],blurb:'Gigabit to every flat for the price of a coffee. Peers with anyone.'}, {id:'ups',name:'UPC-You-Later',asn:6380,type:'eye',pol:'selective',minIx:8,minPni:25,share:.006,col:'#D8001B',pops:['waw','prg','vie','bud','zrh','kyv'],ix:['waw','prg','vie','kyv'],blurb:'Cable broadband across Central Europe. See you later, in a support queue.'}); NETS.push({id:'kys',name:'KyivStar-ish',asn:15859,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,col:'#0055B8',pops:['kyv','waw','fra'],ix:['kyv'],blurb:'Ukraine’s biggest mobile network. Has kept working through things most networks never have to plan for.'}); NETS.push({id:'stc',name:'Sticky Telecom',asn:39368,type:'t2',pol:'selective',minIx:10,minPni:30,share:.01,price:8,col:'#4F008C',pops:['ruh','jed','dxb','fra','lon','cai'],ix:['ruh'],blurb:'The Kingdom’s incumbent. Once you are in, you stay in.'}, {id:'ord',name:'Ooh-redoo',asn:8871,type:'eye',pol:'paid',paidFee:5000,share:.004,col:'#ED1C24',pops:['doh','dxb','jkt'],ix:[],blurb:'Qatar’s big operator. Paid peering only, and it sings the price list to you.'}); +NETS.push( + {id:'tim',name:'TIM-Tam Italia',asn:3269,type:'eye',pol:'selective',minIx:8,minPni:25,share:.008,col:'#004691',pops:['mil','rom','pmo'],ix:['mil','rom'],blurb:'Italy’s incumbent. Sweet on the outside, very firm about peering ratios.'}, + {id:'skl',name:'Sparkle-ish Seabone',asn:6762,type:'t2',pol:'selective',minIx:12,minPni:35,share:.006,price:5,col:'#5B2C83',pops:['pmo','mil','rom','ath','mrs','fra','lon','ist','cai','nyc','mia','sao'],ix:['pmo','mil'],blurb:'Italy’s carrier. Born in Sicily and still very proud of Palermo.'}, + {id:'fwb',name:'Fast-Webby',asn:12874,type:'eye',pol:'open',share:.004,col:'#FDC300',pops:['mil','rom'],ix:['mil','rom'],blurb:'Fiber to the Italian home, with a website from 2003.'}, + {id:'meo',name:'MEO-w Portugal',asn:3243,type:'eye',pol:'selective',minIx:5,minPni:20,share:.004,col:'#00A3E0',pops:['lis','mad'],ix:['lis'],blurb:'Portugal’s incumbent. Purrs when you send it traffic.'}, + {id:'nos',name:'NOS-y Neighbour',asn:2860,type:'eye',pol:'open',share:.003,col:'#111111',pops:['lis'],ix:['lis'],blurb:'Peers with anyone, and wants to know everything about your routes.'}, + {id:'cos',name:'Cosmo-Note',asn:6799,type:'eye',pol:'selective',minIx:5,minPni:20,share:.004,col:'#7DC242',pops:['ath','sof'],ix:['ath'],blurb:'Greece’s incumbent. Takes careful notes on every peering request.'}, + {id:'spc',name:'Spectre-um Cable',asn:20115,type:'eye',pol:'selective',minIx:12,minPni:35,share:.02,col:'#0099D8',pops:['nyc','lax','dal','chi','atn','den','phx','slc','hou','bos','sjc'],ix:['nyc','lax','dal','chi','atn','den'],blurb:'Cable broadband for half of America. Haunts your traceroutes.'}, + {id:'vzn',name:'Very-Zone',asn:701,type:'eye',pol:'paid',paidFee:9000,share:.015,col:'#CD040B',pops:['nyc','ash','bos','dal','lax','chi','atn','mia'],ix:[],blurb:'Can you hear me now? Only if you pay for the PNI.'}); +/* Rival exchanges. Big metros rarely have just one IX: challengers undercut the incumbent and + share many members with it, but not all. The incumbent keeps the city id, challengers are 'city~n'. */ +const XIX=[ + {id:'fra~2',c:'fra',name:'Kleyer-IX',cheap:0.5,take:0.55,blurb:'Two streets from DE-KICKS and publishes its prices on one web page, which DE-KICKS considers an act of war.'}, + {id:'fra~3',c:'fra',name:'Apfelwein-IX',cheap:0.3,take:0.3,blurb:'A community exchange run from above a cider bar. Tiny, cheap, and every member gets a glass.'}, + {id:'ams~2',c:'ams',name:'NL-Nyx',cheap:0.6,take:0.6,blurb:'One fabric across the whole country. Distributed, cheap and a little smug about it.'}, + {id:'ams~3',c:'ams',name:'Fries-IX',cheap:0.25,take:0.3,blurb:'Volunteer-run, for hobby networks and the odd giant. Ports are almost free. Mayonnaise is extra.'}, + {id:'lon~2',c:'lon',name:'LONAPPLE',cheap:0.55,take:0.55,blurb:'Member-owned and not for profit. No frills, no sales team, everyone knows everyone.'}, + {id:'par~2',c:'par',name:'Baguette-IX',cheap:0.55,take:0.5,blurb:'The challenger. Fresh every morning, a bit crusty by the evening.'}, + {id:'mad~2',c:'mad',name:'Tapas-IX',cheap:0.5,take:0.55,blurb:'Small plates of peering at small prices, two blocks from the DE-KICKS fabric.'}, + {id:'mil~2',c:'mil',name:'Aperitivo-IX',cheap:0.5,take:0.45,blurb:'Opens at six, comes with free snacks, closes when the last session drops.'}, + {id:'ber~2',c:'ber',name:'Club-Mate-IX',cheap:0.35,take:0.4,blurb:'Run by hackers on caffeine. The route server has a disco ball.'}, + {id:'waw~2',c:'waw',name:'Bigos-IX',cheap:0.45,take:0.5,blurb:'Warsaw has more exchanges than anyone can count. This is the second biggest, this week.'}, + {id:'waw~3',c:'waw',name:'Zapiekanka-IX',cheap:0.3,take:0.35,blurb:'Open-faced, cheap and available at 3 a.m.'}, + {id:'prg~2',c:'prg',name:'Knedlík-IX',cheap:0.35,take:0.4,blurb:'Dense, filling and very cheap.'}, + {id:'buh~2',c:'buh',name:'Mici-IX',cheap:0.35,take:0.45,blurb:'Grilled ports, served with mustard and a cold beer.'}, + {id:'sto~2',c:'sto',name:'Fika-IX',cheap:0.5,take:0.5,blurb:'Every session comes with a coffee break. Strictly enforced.'}, + {id:'kyv~2',c:'kyv',name:'Kyiv-Cake-IX',cheap:0.35,take:0.45,blurb:'Layered, resilient and somehow always open.'}, + {id:'nyc~2',c:'nyc',name:'Bagel-IX',cheap:0.6,take:0.5,blurb:'A community exchange in a Hudson Street basement. Schmear not included.'}, + {id:'chi~2',c:'chi',name:'Deep-Dish-IX',cheap:0.6,take:0.5,blurb:'Takes forever to set up, but very filling.'}, + {id:'sjc~2',c:'sjc',name:'Garage-IX',cheap:0.55,take:0.45,blurb:'Started in somebody’s garage, like everything else round here.'}, + {id:'lax~2',c:'lax',name:'Smog-IX',cheap:0.6,take:0.45,blurb:'You can’t see the fabric, but it is definitely there.'}, + {id:'sin~2',c:'sin',name:'Kopi-IX',cheap:0.6,take:0.5,blurb:'Strong, sweet and cheaper than the incumbent.'}, + {id:'hkg~2',c:'hkg',name:'Dim-Sum-IX',cheap:0.6,take:0.5,blurb:'Lots of small sessions on little plates.'}, + {id:'tok~2',c:'tok',name:'Bento-IX',cheap:0.65,take:0.5,blurb:'Neatly packed, every member in its own compartment.'}, + {id:'syd~2',c:'syd',name:'Vegemite-IX',cheap:0.6,take:0.5,blurb:'An acquired taste. The locals love it.'}, + {id:'bom~2',c:'bom',name:'Vada-Pav-IX',cheap:0.45,take:0.45,blurb:'Mumbai’s street-food exchange. Fast, spicy and cheap.'}, + {id:'dxb~2',c:'dxb',name:'Shawarma-IX',cheap:0.6,take:0.4,blurb:'The challenger to the DE-KICKS fabric, wrapped and ready to go.'}, +]; +const XIXM=Object.fromEntries(XIX.map(x=>[x.id,x])); +/* The long tail: odd little networks with a sliver of traffic each, on one or two exchanges. */ +const TAIL=[ + ['Grandma’s Basement Hosting','cdn',['fra'],'Three servers, one dehumidifier and a very patient grandmother.'], + ['Hamster Wheel Networks','eye',['ams'],'Powered by renewable rodents. Uptime depends on snack schedule.'], + ['Fjordnet Kooperativ','eye',['osl'],'A fiber co-op for one valley. Every member owns a metre of cable.'], + ['Kebab-Link','eye',['ber','fra'],'An ISP run from the back of a kebab shop. Late-night support is excellent.'], + ['Mesh Collective e.V.','eye',['ber','fra'],'Volunteers with rooftop antennas and strong opinions about IPv6.'], + ['Village Fibre Co-op','eye',['lon'],'Dug the trench themselves, one field at a time.'], + ['Tiny Swiss Bank Shield','cdn',['zrh'],'Hosts exactly one website and three lawyers.'], + ['Clockwork ISP','eye',['zrh'],'Packets leave on time, to the second.'], + ['LAN-Party Federation','cdn',['ams','fra'],'Game servers, energy drinks and a ping obsession.'], + ['Former Church Datacenter','cdn',['ams'],'Racks in the nave, cooling in the crypt. Divine uptime.'], + ['WISP on a Silo','eye',['dal','chi'],'Wireless internet from the top of a grain silo.'], + ['Cornfield Broadband','eye',['chi'],'Rural fiber that follows the tractor routes.'], + ['Moose Lake Telephone Co-op','eye',['tor','mtl'],'Has served the lake since 1912. Now with fiber.'], + ['Surf Shop Networks','cdn',['lax'],'Hosting for surfboard shops. Closed when the waves are good.'], + ['Ski Lift Fiber','eye',['den','zrh'],'Fiber strung along the chairlifts. Seasonal latency.'], + ['Tumbleweed Telecom','eye',['phx','dal'],'Covers a lot of empty ground.'], + ['Crypto Bro Colo','cdn',['ash','mia'],'Ten thousand GPUs and a podcast.'], + ['Ye Olde University Network','eye',['bos','lon'],'Has had a /8 since before you were born.'], + ['Mom & Pop Packet Shop','eye',['nyc'],'Family-run since dial-up. Still answers the phone.'], + ['Space Cowboy Broadband','eye',['hou','dal'],'Yee-haw and low Earth orbit.'], + ['Fry Sauce Fibre','eye',['slc'],'Utah’s dipping-sauce of an ISP.'], + ['Sauna Uplink Oy','cdn',['hel','sto'],'Servers cooled by the lake, then used to heat the sauna.'], + ['Reindeer Relay','eye',['sto','osl','hel'],'Wireless links across the tundra. Antlers occasionally in the way.'], + ['Pierogi Hosting','cdn',['waw'],'Cheap, filling hosting. Ask for the potato-and-cheese plan.'], + ['Sunflower Uplink','eye',['kyv','waw'],'Kept the lights on in its town through every blackout.'], + ['Tram Line Telecom','eye',['prg','vie'],'Fiber laid under the tram tracks during a night shift.'], + ['Paprika Peering','eye',['bud'],'Spicy pricing, mild latency.'], + ['Dracula Datacenter','cdn',['buh'],'Only comes online at night.'], + ['Bosphorus Ferry Net','eye',['ist'],'Wi-Fi on every ferry, backhaul on every bridge.'], + ['Gondola Gigabit','eye',['mil','rom'],'Started in Venice. Upgraded to land.'], + ['Nonna’s Pasta Pipes','cdn',['rom','pmo'],'Hosting for every family restaurant in the south.'], + ['Tram 28 Telecom','eye',['lis'],'Slow on the hills, fast on the flat.'], + ['Olive Grove Online','eye',['ath'],'Rural broadband for the islands, one olive tree at a time.'], + ['Siesta Server Hotel','cdn',['mad'],'Down from 2 to 5 p.m. every day. By design.'], + ['Bouillabaisse Bits','cdn',['mrs','par'],'A rich mix of everything the fishermen brought in.'], + ['Baguette Bandwidth Associés','eye',['par'],'Delivered fresh every morning.'], + ['Pub Quiz Internet','eye',['dub','lon'],'Founded after a pub quiz, by the losing team.'], + ['Gaming Café Net','eye',['lag'],'Internet cafe turned ISP. The gamers came for the ping.'], + ['Matatu Mobile Mesh','eye',['nbo'],'Wi-Fi on minibuses, and the music is free.'], + ['Load-Shedding Survivors','eye',['jnb','cpt'],'Has more batteries than customers.'], + ['Bollywood Buffer','cdn',['bom','del'],'Three-hour films, zero-second start times.'], + ['Hawker Centre Hosting','cdn',['sin','kul'],'Cheap, fast and open late.'], + ['Karaoke Box Networks','cdn',['tok','osa','icn'],'Lyrics servers, low latency, high pitch.'], + ['Night Market Net','eye',['tpe','hkg'],'Comes alive after dark.'], + ['Kangaroo Courier','eye',['syd','mel','bne'],'Packets hop. Sometimes backwards.'], + ['Hobbit Hole Hosting','cdn',['akl'],'Cosy racks under a hill. Second breakfast at 11.'], + ['Capybara Connect','eye',['sao','bue'],'Gets along with every other network. Famously chill.'], + ['Llama Link','eye',['lim','scl','bog'],'Mountain wireless. Will spit at bad routes.'], + ['Supercar Hosting','cdn',['dxb'],'Gold-plated servers, valet parking for packets.'], + ['Tango Transit Co-op','eye',['bue'],'It takes two to peer.'], + ['Bánh Mì Broadband','eye',['sgn'],'Crispy on the outside, cheap on the inside.'], + ['Jeepney Jumpnet','eye',['mnl'],'Colourful, crowded and gets you there eventually.'], + ['Game Server Gremlins','cdn',['fra','ams','lon','nyc','sjc'],'Hosts every game you play at 2 a.m. Hates jitter.',0.003], + ['Discord-ant Voice Relay','cdn',['ams','fra','ash'],'Voice chat for millions of gamers who all talk at once.',0.003], + ['Mastodon Instance Herd','cdn',['ber','ams','par'],'A thousand tiny social networks on one rack.'], + ['Dutch Bike Fibre','eye',['ams'],'Fiber laid along the bike lanes. Fastest in the rain.'], + ['Chip Fab Cleanroom Net','cdn',['tpe','phx'],'Bunny suits mandatory in the server room.'], + ['Volunteer Fire Brigade Wi-Fi','eye',['vie','zrh'],'Runs the village network between call-outs.'], + ['Peach State Hosting','cdn',['atn'],'Sweet, fuzzy and surprisingly reliable.'], + ['Chowder Hosting','cdn',['bos'],'Thick, comforting and very New England.'], +]; +function ixStatic(c){const o=[];if(CITY[c]&&CITY[c].ix)o.push(c);for(const x of XIX)if(x.c===c)o.push(x.id);return o;} +TAIL.forEach(([name,type,home,blurb,sh],i)=>{const h=hstr(name),cand=home.flatMap(ixStatic),ix=[]; + if(cand.length){ix.push(cand[h%cand.length]);if(cand.length>1&&(h>>>8)%100<40){const o=cand[(h>>>12)%cand.length];if(!ix.includes(o))ix.push(o);}} + const sel=(h>>>4)%10>=8; + NETS.push({id:'tail'+i,name,asn:200000+(h%190000),type,tail:true,pol:sel?'selective':'open',...(sel?{minIx:1+(h>>>16)%3,minPni:6+(h>>>18)%8}:{}),share:sh||+(0.0006+((h>>>20)%15)*0.0001).toFixed(4),col:`hsl(${h%360} 55% 46%)`,pops:home.slice(),ix,blurb});}); const NET=Object.fromEntries(NETS.map(n=>[n.id,n])); +for(const X of XIX){X.members=NETS.filter(n=>Array.isArray(n.ix)&&n.ix.includes(X.id)||!n.tail&&(n.ix==='ALL'||Array.isArray(n.ix)&&n.ix.includes(X.c))&&hstr(n.id+'|'+X.id)%100<(n.ix==='ALL'?72:X.take*100)).map(n=>n.id);} const NSH={}; {const t=NETS.reduce((a,n)=>a+n.share,0); NETS.forEach(n=>NSH[n.id]=n.share/t);} const CN_W={ctc:.2,cun:.14,cmb:.08,tcs:.22,abc:.14,byd:.08,bdc:.08,akm:.02,msf:.02,amz:.01,drz:.01}; const RU_W={ydx:.24,vkl:.12,rtc:.14,ggl:.12,bdc:.08,akm:.05,cfl:.06,msf:.04,amz:.03,tly:.02,cog:.02,drz:.01}; @@ -1007,7 +1131,7 @@ function trPaths(src){const live=S.links.filter(l=>!linkDown(l)),rem=remoteCitie function trExits(net){const day=S.day,ev=S.ev,leak=ev.leak&&ev.leak.until>day?ev.leak.net:null,out=[]; for(const x of S.caches)if(x.net===net&&popUp(x.city)&&!siteDown(x.city,'a'))out.push({k:'c',rank:0,city:x.city,pref:'normal',lab:NET[net].cache.name+' cache',used:R.useCache[x.id]||0,cap:CACHE_CAP}); for(const p of S.pni)if(p.net===net&&popUp(p.city)&&liveN(p.city,p.site,p.n))out.push({k:'p',rank:1,city:p.city,pref:p.pref||'normal',lab:'PNI with '+NET[net].name,used:R.usePni[p.id]||0,cap:liveCap(PORT[p.tier].g,p.city,p.site,p.n)}); - for(const c in S.ixp)if(ixSessions(c).has(net)&&(popUp(c)||remoteCities().includes(c))&&!(ev.ixdown&&ev.ixdown[c]>day))out.push({k:'ix',rank:2,city:c,pref:(S.ixPref&&S.ixPref[c])||'normal',lab:ixName(c)+' peering',used:R.useIx[c]||0,cap:ixCap(c)}); + for(const c in S.ixp)if(ixSessions(c).has(net)&&(popUp(ixCity(c))||remoteCities().includes(ixCity(c)))&&!(ev.ixdown&&ev.ixdown[c]>day))out.push({k:'ix',rank:2,city:ixCity(c),id:c,pref:(S.ixPref&&S.ixPref[c])||'normal',lab:ixName(c)+' peering',used:R.useIx[c]||0,cap:ixCap(c)}); for(const t of S.transit)if(popUp(t.city)&&!(t.down>day)&&liveN(t.city,t.site,t.n)&&net!==leak&&!((ev.depeer>day||scnRule('spat'))&&t.net==='cog'&&net==='ggl'))out.push({k:'t',rank:3,city:t.city,pref:t.pref||'normal',lab:NET[t.net].name+' transit',tnet:t.net,used:R.useT[t.id]||0,cap:liveCap(PORT[t.tier].g,t.city,t.site,t.n)}); return out;} function traceroute(src,to){const P=trPaths(src),me=slug(S.name)+'.net',lines=[],ip=(a,b)=>`100.64.${a%250}.${b%250}`;let rtt=0.3,n=1; @@ -1095,13 +1219,16 @@ function kmBetween(a,b){const A=CITY[a],B=CITY[b];return Math.max(20,Math.round( const isSub=(a,b)=>CITY[a].land!==CITY[b].land; const popUp=c=>S.pops[c]&&!(S.pops[c].down>S.day); const regionsCount=()=>new Set(Object.keys(S.pops).map(c=>CITY[c].reg)).size; -function ixName(c){return S.myIx[c]?S.myIx[c].name:CITY[c].ix;} -function ixMembers(c){if(S.myIx[c])return S.myIx[c].members.slice();if(!CITY[c].ix)return [];return NETS.filter(n=>n.ix==='ALL'||(Array.isArray(n.ix)&&n.ix.includes(c))).map(n=>n.id);} +const ixCity=x=>String(x).split('~')[0]; +function ixIdsIn(c){const o=ixStatic(c);if(S&&S.myIx&&S.myIx[c]&&!o.includes(c))o.unshift(c);return o;} +const hasIxAt=c=>ixIdsIn(c).some(x=>S.ixp[x]!==undefined); +function ixName(c){if(XIXM[c])return XIXM[c].name;return S.myIx[c]?S.myIx[c].name:CITY[c].ix;} +function ixMembers(c){if(XIXM[c])return XIXM[c].members.slice();if(S.myIx[c])return S.myIx[c].members.slice();if(!CITY[c].ix)return [];return NETS.filter(n=>n.ix==='ALL'||(Array.isArray(n.ix)&&n.ix.includes(c))).map(n=>n.id);} // LAG: several identical ports bundled into one logical link. Flow hashing is never perfectly even, so a bundle carries ~95% of the sum. const LAG_MAX=8; function lagCap(g,n){n=n||1;return g*n*(n>1?0.95:1);} function lagName(tier,n){return (n||1)>1?`${n}×${PORT[tier].n} LAG`:`${PORT[tier].n} port`;} -function ixCap(c){return S.myIx[c]?myFab(c).g*(S.pops[c]&&(siteDown(c,'a'))?0:1):liveCap(PORT[S.ixp[c]].g,c,(S.ixSite||{})[c],(S.ixn||{})[c])*(isRemote(c)?REMOTE_CAP:1);} +function ixCap(c){return S.myIx[c]?myFab(c).g*(S.pops[c]&&(siteDown(c,'a'))?0:1):liveCap(PORT[S.ixp[c]].g,ixCity(c),(S.ixSite||{})[c],(S.ixn||{})[c])*(isRemote(c)?REMOTE_CAP:1);} function ixSessions(c){ const s=new Set(); if(S.ixp[c]===undefined)return s; for(const id of ixMembers(c)){const n=NET[id]; @@ -1137,9 +1264,19 @@ function snub(id,c){ const REMOTE_FEE=1.5,REMOTE_CAP=0.8; const REMOTE_WARN=`

Remote peering is a last resort. Ports come through a reseller at 1.5× the price, only 80% of the port is really yours, latency rides the fabric, one fabric outage drops every session, and many selective networks refuse remote members. A POP here is better.

`; const REMOTE_WHY=['Policy: no remote peers. Be in the building or be in the transit bill.','Saw your session come in over a fabric and said "we can smell the VXC from here".','Only peers with members they can reach without a 1,500 km hairpin.','Their PearingDB entry says "Remote peering: No (we mean it)".','Tried a remote peer once. It flapped during a product launch. Never again.']; -function isRemote(c){return S.ixp[c]!==undefined&&!S.pops[c]&&!S.myIx[c];} +function isRemote(c){return S.ixp[c]!==undefined&&!S.pops[ixCity(c)]&&!S.myIx[c];} function noRemote(id){const n=NET[id];if(!n||n.pol!=='selective')return false;return hstr(id+'|remote')%100<(n.share>=0.03?60:30);} -function ixPortMo(c,tier){return Math.round(PORT[tier].ix*(S.pops[c]?1:REMOTE_FEE)*dkMult(c)*(CITY[c].ixCheap||1));} +/* Europe's peering market is crowded and competitive: ports are cheaper, and incumbents cut prices + when a challenger in the same metro gets too popular. DE-KICKS harmonises instead. */ +const IX_REG={EU:0.8}; +function ixMul(x){const X=XIXM[x],c=ixCity(x);return (X?X.cheap:(CITY[c].ixCheap||1))*(IX_REG[CITY[c].reg]||1)*((S&&S.ixCut&&S.ixCut[x])||1);} +function ixPortMo(c,tier){return Math.round(PORT[tier].ix*(S.pops[ixCity(c)]?1:REMOTE_FEE)*dkMult(c)*ixMul(c));} +function ixPriceWar(d){if(!S.ixp||Math.random()>=1/120)return; + const mine=Object.keys(S.ixp).filter(x=>{const c=ixCity(x);return CITY[c].reg==='EU'&&ixStatic(c).length>1;});if(!mine.length)return; + const x=pick(mine),c=ixCity(x),rival=pick(ixStatic(c).filter(y=>y!==x)); + if(isDk(x)){toast(`${esc(ixName(rival))} is poaching DE-KICKS members in ${esc(CITY[c].name)}.
DE-KICKS responded with a webinar about "the value of premium interconnection". Prices unchanged.`,'bad');return;} + S.ixCut=S.ixCut||{};const cur=S.ixCut[x]||1;if(cur<=0.62)return;S.ixCut[x]=+Math.max(0.6,cur*0.9).toFixed(3); + toast(`Price war in ${esc(CITY[c].name)}!
${esc(ixName(x))} cut its port prices 10% to stop members drifting to ${esc(ixName(rival))}. Your invoice just got smaller.`,'good');} /* DE-KICKS Group: runs several big exchanges and really, really hates open pricing. No price list, personalised quotes, haggling, yearly "harmonisation", auto-enrolled add-ons you have to opt out of, and a retention offer when you try to leave. */ @@ -1151,7 +1288,7 @@ function dkMult(c){if(!S||!isDk(c)||!S.dk||!S.dk.m[c])return 1;const ret=S.dk.re function dkAddonMo(c){return S.dk&&S.dk.add[c]?S.dk.add[c].reduce((a,x)=>a+x.mo,0):0;} function dkState(){S.dk=S.dk||{m:{},add:{},ret:{},retUsed:{},stall:0,q:null};return S.dk;} function dkQuoteMult(){const pops=Object.keys(S.pops).length,big=Math.min(1.2,pops*0.04+(R.served||0)/20000);return +(0.95+Math.random()*0.45+big).toFixed(2);} -function dkQuoteModal(){const q=S.dk.q,c=q.city,mo=Math.round(PORT[q.tier].ix*(S.pops[c]?1:REMOTE_FEE)*q.m*(CITY[c].ixCheap||1)); +function dkQuoteModal(){const q=S.dk.q,c=q.city,mo=Math.round(PORT[q.tier].ix*(S.pops[c]?1:REMOTE_FEE)*q.m*ixMul(c)); openModal(`
DE-KICKS Group · Sales

Your personalised ${PORT[q.tier].n} quote for ${esc(ixName(c))}

“Thanks for your interest! We don't publish prices, because every customer is unique.”

Monthly price, just for you${fmt$(mo)}/mo
@@ -1186,7 +1323,7 @@ function peerOk(id,via,city){ const HOT=0.9,HOTL={t:'T',ix:'IX',p:'P',c:'C',r:'R'},HOTC={t:'#7B61FF',ix:'#FFD23F',p:'#2C7A7B',c:'#C8102E',r:'#FF4F9A'}; function hotPorts(){const out=[];if(!R||!S)return out; for(const t of S.transit){if(t.down>S.day)continue;const cap=lagCap(PORT[t.tier].g,t.n),u=(R.useT[t.id]||0)/cap;if(u>=HOT)out.push({k:'t',city:t.city,lab:`${NET[t.net].name} transit · ${lagName(t.tier,t.n)}`,u,tip:'Add a LAG member, upgrade the port or buy a second upstream.'});} - for(const c in S.ixp){const cap=ixCap(c);if(!cap)continue;const u=(R.useIx[c]||0)/cap;if(u>=HOT)out.push({k:'ix',city:c,lab:`${ixName(c)} port`,u,tip:'Upgrade the IX port or add a LAG member.'});} + for(const c in S.ixp){const cap=ixCap(c);if(!cap)continue;const u=(R.useIx[c]||0)/cap;if(u>=HOT)out.push({k:'ix',city:ixCity(c),lab:`${ixName(c)} port`,u,tip:'Upgrade the IX port or add a LAG member.'});} for(const p of S.pni){const cap=lagCap(PORT[p.tier].g,p.n),u=(R.usePni[p.id]||0)/cap;if(u>=HOT)out.push({k:'p',city:p.city,lab:`PNI with ${NET[p.net].name}`,u,tip:'Add a LAG member or upgrade the PNI.'});} const cc={};for(const x of S.caches){const k=x.city+'|'+x.net;(cc[k]=cc[k]||{city:x.city,net:x.net,used:0,cap:0});cc[k].used+=R.useCache[x.id]||0;cc[k].cap+=CACHE_CAP;} for(const k in cc){const x=cc[k],u=x.used/x.cap;if(u>=HOT)out.push({k:'c',city:x.city,lab:`${NET[x.net].cache.name} cache${x.cap>CACHE_CAP?'s':''}`,u,tip:'Ask for another box. The overflow goes out over peering or transit.'});} @@ -1265,8 +1402,8 @@ function compute(){ const depeer=ev.depeer>day||scnRule('spat'), leak=ev.leak&&ev.leak.until>day?ev.leak.net:null; for(const t of S.transit){if(!popUp(t.city)||t.down>day||!liveN(t.city,t.site,t.n))continue; E.push({k:'t',prem:!!t.premium&&t.city==='hkg',pref:t.pref||'normal',lab:NET[t.net].name+' transit',id:t.id,city:t.city,cap:Math.min(liveCap(PORT[t.tier].g,t.city,t.site,t.n),TRX&&TRX.cap[t.net]!==undefined?TRX.cap[t.net]:Infinity),used:0,rank:3,ok:n=>!(depeer&&t.net==='cog'&&n==='ggl')&&n!==leak});} - for(const c in S.ixp){if(!(popUp(c)||remote.includes(c))||(S.ev.ixdown&&S.ev.ixdown[c]>day)||!liveN(c,(S.ixSite||{})[c],(S.ixn||{})[c]))continue;const set=ixSessions(c);R2.sessions+=set.size; - E.push({k:'ix',pref:(S.ixPref&&S.ixPref[c])||'normal',lab:ixName(c)+' peering',id:c,city:c,cap:ixCap(c),used:0,rank:2,ok:n=>set.has(n)});} + for(const c in S.ixp){const ct=ixCity(c);if(!(popUp(ct)||remote.includes(ct))||(S.ev.ixdown&&S.ev.ixdown[c]>day)||!liveN(ct,(S.ixSite||{})[c],(S.ixn||{})[c]))continue;const set=ixSessions(c);R2.sessions+=set.size; + E.push({k:'ix',pref:(S.ixPref&&S.ixPref[c])||'normal',lab:ixName(c)+' peering',id:c,city:ct,cap:ixCap(c),used:0,rank:2,ok:n=>set.has(n)});} for(const p of S.pni){if(!popUp(p.city)||!liveN(p.city,p.site,p.n))continue;R2.sessions++;E.push({k:'p',pnc:!!NET[p.net].cn,pref:p.pref||'normal',lab:'PNI with '+NET[p.net].name,id:p.id,city:p.city,cap:liveCap(PORT[p.tier].g,p.city,p.site,p.n),used:0,rank:1,ok:n=>n===p.net});} for(const c of S.caches){if(!popUp(c.city)||siteDown(c.city,'a'))continue;E.push({k:'c',pref:'normal',lab:NET[c.net].cache.name+' cache',id:c.id,city:c.city,cap:CACHE_CAP,used:0,rank:0,ok:n=>n===c.net});} {const rp=ev.rpki&&ev.rpki.until>day?new Set(ev.rpki.nets):null;if(rp)for(const e of E){if(e.k==='c')continue;const o=e.ok;e.ok=n=>!rp.has(n)&&o(n);}} @@ -1380,7 +1517,7 @@ function nniUsed(c,prov){return S.links.filter(l=>l.kind==='vxc'&&l.prov===prov& function nniPort(c,prov){return (S.nni||[]).find(x=>x.city===c&&x.prov===prov);} function repayCost(l,B){return B.equity?Math.round(l.amount*3):Math.round(Math.max(l.bal,B.crypto&&l.got?l.got:0)*1.02);} const own=(o,k)=>Object.prototype.hasOwnProperty.call(o,k); -const isCity=c=>typeof c==='string'&&own(CITY,c),isNet=n=>typeof n==='string'&&own(NET,n); +const isCity=c=>typeof c==='string'&&own(CITY,c),isIx=x=>typeof x==='string'&&(own(CITY,x)||own(XIXM,x)),isNet=n=>typeof n==='string'&&own(NET,n); const num=(v,d=0)=>{v=+v;return Number.isFinite(v)?v:d;},int=(v,lo,hi,d)=>{v=Math.round(num(v,d));return Math.min(hi,Math.max(lo,v));}; /* Saves come from localStorage or from imported files, so treat them as untrusted: fill in anything missing, drop references to cities, networks or types that do not exist, and force numbers to be numbers. */ @@ -1399,10 +1536,10 @@ function sanitize(s){ s.transit=s.transit.filter(t=>t&&isCity(t.city)&&isNet(t.net)).map(t=>(t.site=['a','b','ab'].includes(t.site)?t.site:'a',t.id=sid(t.id),t.tier=tier(t.tier),t.n=lag(t.n),t.down=num(t.down,0),t)); s.pni=s.pni.filter(x=>x&&isCity(x.city)&&isNet(x.net)).map(x=>(x.site=['a','b','ab'].includes(x.site)?x.site:'a',x.id=sid(x.id),x.tier=tier(x.tier),x.n=lag(x.n),x)); s.caches=s.caches.filter(x=>x&&isCity(x.city)&&isNet(x.net)&&NET[x.net].cache).map(x=>(x.id=sid(x.id),x)); - for(const c of Object.keys(s.ixp)){if(!isCity(c))delete s.ixp[c];else s.ixp[c]=tier(s.ixp[c]);} - for(const k of ['rs','ixn','ixPref','ixSite'])for(const c of Object.keys(s[k]))if(!isCity(c))delete s[k][c]; + for(const c of Object.keys(s.ixp)){if(!isIx(c))delete s.ixp[c];else s.ixp[c]=tier(s.ixp[c]);} + for(const k of ['rs','ixn','ixPref','ixSite'])for(const c of Object.keys(s[k]))if(!isIx(c))delete s[k][c];if(s.ixCut&&typeof s.ixCut==='object'){for(const c of Object.keys(s.ixCut))if(!isIx(c))delete s.ixCut[c];else s.ixCut[c]=Math.min(1,Math.max(0.6,num(s.ixCut[c],1)));}else delete s.ixCut; for(const c of Object.keys(s.ixn))s.ixn[c]=lag(s.ixn[c]);for(const c of Object.keys(s.ixSite))if(!['a','b','ab'].includes(s.ixSite[c]))s.ixSite[c]='a'; - for(const k of Object.keys(s.peers)){const [n,c]=k.split('@');if(!isNet(n)||!isCity(c))delete s.peers[k];} + for(const k of Object.keys(s.peers)){const [n,c]=k.split('@');if(!isNet(n)||!isIx(c))delete s.peers[k];} for(const c of Object.keys(s.myIx)){const m=s.myIx[c];if(!isCity(c)||!m||typeof m!=='object'){delete s.myIx[c];continue;}m.members=Array.isArray(m.members)?m.members.filter(isNet):[];m.name=String(m.name||'Your IX').slice(0,40);m.next=num(m.next,s.day);m.fab=int(m.fab,0,MYIX_FAB.length-1,0);} const okBiz=b=>b&&own(BIZ_T,b.type)&&isCity(b.city)&&(!b.city2||isCity(b.city2))&&(!b.sites||Array.isArray(b.sites)&&b.sites.every(isCity)); const fixBiz=b=>{b.id=sid(b.id);b.name=String(b.name||'Customer').slice(0,80);b.bw=num(b.bw,1);b.rate=num(b.rate,0);if(b.fee!==undefined)b.fee=num(b.fee,0);if(b.start!==undefined)b.start=num(b.start,0);if(b.dur!==undefined)b.dur=num(b.dur,1);if(b.slots!==undefined)b.slots=num(b.slots,0);if(b.what!==undefined)b.what=String(b.what).slice(0,200);if(!Array.isArray(b.reqs))b.reqs=[];b.reqs=b.reqs.filter(r=>own(REQS,r));if(b.mood!==undefined)b.mood=num(b.mood,100);if(b.exp!==undefined)b.exp=num(b.exp,0);if(b.latMax!=null)b.latMax=num(b.latMax,10);if(b.route&&!own(RT,b.route))b.route='normal';return b;}; @@ -1426,7 +1563,7 @@ const REQS={ netchill:{l:'Wants NetChill on-net: a cache or a PNI',bonus:.15,ok:()=>S.caches.some(c=>c.net==='nfx')||S.pni.some(p=>p.net==='nfx')}, gen:{l:'Backup generator in every city they touch',bonus:.15,ok:b=>[b.city,b.city2].filter(Boolean).every(c=>S.pops[c]&&S.pops[c].gen)}, routers:{l:'Insists on two routers in their city',bonus:.15,ok:b=>((S.pops[b.city]&&S.pops[b.city].routers)||1)>=2}, - local:{l:'Local breakout: transit or an IX port in their own city',bonus:.2,ip:true,ok:b=>S.transit.some(t=>t.city===b.city)||S.ixp[b.city]!==undefined}, + local:{l:'Local breakout: transit or an IX port in their own city',bonus:.2,ip:true,ok:b=>S.transit.some(t=>t.city===b.city)||hasIxAt(b.city)}, metro:{l:'Two data centers in every metro they touch',bonus:.2,only:true,ok:b=>[b.city,b.city2].filter(Boolean).every(c=>S.pops[c]&&S.pops[c].site2)}, twoup:{l:'Wants two different transit providers (or none at all)',bonus:.15,ip:true,ok:()=>new Set(S.transit.map(t=>t.net)).size>=2||S.transit.length===0}, china:{l:'Needs low-loss reach into China',bonus:.3,ip:true,ok:()=>S.transit.some(t=>t.premium&&t.city==='hkg')||S.links.some(l=>l.premium)||S.pni.some(p=>NET[p.net].cn)}, @@ -1716,7 +1853,7 @@ function dayTick(){ if(!S||S.lost)return; S.day++; const d=S.day; - dkTick(d); + dkTick(d);ixPriceWar(d); if(!S.phpDone&&d>45&&Math.random()<1/400)elephant(); if(R&&R.teMoved)S.stats.teMax=Math.max(S.stats.teMax||0,R.teMoved); if(R&&R.demand>0)S.stats.clean=R.served/R.demand>=0.995?(S.stats.clean||0)+1:0; @@ -1912,14 +2049,14 @@ const ACT={ buyTransit:({city,net,tier})=>{tier=+tier;if(scnRule('noTransit')){toast('No transit in this scenario.
Peering, PNIs, caches and your own fiber only.','bad');sfx('err');return;}if(!S.pops[city]||!NET[net]||!NET[net].price||!NET[net].pops.includes(city)||!PORT[tier])return;if(!portOk(city,tier)){toast(`Your router can't take a ${PORT[tier].n} port.
Upgrade it in the Infra tab.`,'bad');sfx('err');return;}const ex=S.transit.find(t=>t.city===city&&t.net===net);if(ex&&tier<=ex.tier)return;if(!spend(PORT[tier].setup*(ex&&ex.n||1)))return;if(ex)ex.tier=tier;else S.transit.push({id:uid(),city,net,tier,down:0});toast(`${esc(NET[net].name)} transit is live in ${CITY[city].name}.
Full table received: ~1,000,000 routes.`,'good');after();}, lagT:({id,d})=>{d=+d;if(d!==1&&d!==-1)return;const t=S.transit.find(x=>x.id===id);if(!t)return;const n=(t.n||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0){if(!portOk(t.city,t.tier))return;if(!spend(PORT[t.tier].setup))return;}t.n=n;if(n<2&&t.site==='ab')t.site='a';toast(+d>0?`LAG member added.
${esc(NET[t.net].name)} in ${CITY[t.city].name} is now ${lagName(t.tier,n)}.`:`LAG member removed.`,'good');after();}, lagP:({id,d})=>{d=+d;if(d!==1&&d!==-1)return;const p=S.pni.find(x=>x.id===id);if(!p)return;const n=(p.n||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0&&!spend(1500+PORT[p.tier].setup/2))return;p.n=n;if(n<2&&p.site==='ab')p.site='a';sfx('build');after();}, - lagIx:({city,d})=>{d=+d;if(d!==1&&d!==-1)return;if(!isCity(city)||S.ixp[city]===undefined||S.myIx[city]||!S.pops[city])return;S.ixn=S.ixn||{};const n=(S.ixn[city]||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0&&!spend(ixPortMo(city,S.ixp[city])))return;S.ixn[city]=n;if(n<2&&S.ixSite&&S.ixSite[city]==='ab')S.ixSite[city]='a';sfx('build');after();}, + lagIx:({city,d})=>{d=+d;if(d!==1&&d!==-1)return;if(!isIx(city)||S.ixp[city]===undefined||S.myIx[city]||!S.pops[ixCity(city)])return;S.ixn=S.ixn||{};const n=(S.ixn[city]||1)+(+d);if(n<1||n>LAG_MAX)return;if(+d>0&&!spend(ixPortMo(city,S.ixp[city])))return;S.ixn[city]=n;if(n<2&&S.ixSite&&S.ixSite[city]==='ab')S.ixSite[city]='a';sfx('build');after();}, cancelTransit:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.transit=S.transit.filter(t=>t.id!==id);UI.confirm=null;after();}, - buyIx:({city,tier,signed})=>{tier=+tier;if(!PORT[tier]||!ixName(city)||(!S.pops[city]&&(!remoteCities().includes(city)||tier>1))||(S.ixp[city]!==undefined&&tier<=S.ixp[city]))return;if(S.pops[city]&&!portOk(city,tier)){toast(`Your router can't take a ${PORT[tier].n} port.
Upgrade it in the Infra tab.`,'bad');sfx('err');return;} - if(isDk(city)&&S.ixp[city]===undefined&&!signed){const dk=dkState();if(dk.stall>S.day){toast(`DE-KICKS sales is still "aligning".
They will get back to you in ${dk.stall-S.day} days.`,'bad');sfx('err');return;}dk.lastQ=dk.lastQ||{};const lq=dk.lastQ[city];dk.q={city,tier,m:lq&&lq.until>S.day?lq.m:dkQuoteMult(),h:lq&&lq.until>S.day?lq.h:0};dk.lastQ[city]={m:dk.q.m,h:dk.q.h,until:S.day+90};dkQuoteModal();return;}const had=S.ixp[city]!==undefined;if(!spend(ixPortMo(city,tier)*(had?((S.ixn||{})[city]||1):1)))return;S.ixp[city]=tier;if(!had)toast(S.pops[city]?`Port up at ${esc(ixName(city))}!
Now request peering, or join the route server.`:`Remote port up at ${esc(ixName(city))}.
It came through a reseller, so expect a markup, a crowded port and some networks that won't talk to you. The route server is your friend here.`,'good');after();}, + buyIx:({city,tier,signed})=>{tier=+tier;if(!PORT[tier]||!ixName(city)||(!S.pops[ixCity(city)]&&(!remoteCities().includes(ixCity(city))||tier>1))||(S.ixp[city]!==undefined&&tier<=S.ixp[city]))return;if(S.pops[ixCity(city)]&&!portOk(ixCity(city),tier)){toast(`Your router can't take a ${PORT[tier].n} port.
Upgrade it in the Infra tab.`,'bad');sfx('err');return;} + if(isDk(city)&&S.ixp[city]===undefined&&!signed){const dk=dkState();if(dk.stall>S.day){toast(`DE-KICKS sales is still "aligning".
They will get back to you in ${dk.stall-S.day} days.`,'bad');sfx('err');return;}dk.lastQ=dk.lastQ||{};const lq=dk.lastQ[city];dk.q={city,tier,m:lq&&lq.until>S.day?lq.m:dkQuoteMult(),h:lq&&lq.until>S.day?lq.h:0};dk.lastQ[city]={m:dk.q.m,h:dk.q.h,until:S.day+90};dkQuoteModal();return;}const had=S.ixp[city]!==undefined;if(!spend(ixPortMo(city,tier)*(had?((S.ixn||{})[city]||1):1)))return;S.ixp[city]=tier;if(!had)toast(S.pops[ixCity(city)]?`Port up at ${esc(ixName(city))}!
Now request peering, or join the route server.`:`Remote port up at ${esc(ixName(city))}.
It came through a reseller, so expect a markup, a crowded port and some networks that won't talk to you. The route server is your friend here.`,'good');after();}, cancelIx:({city,sure})=>{if(UI.confirm!=='ix'+city){UI.confirm='ix'+city;renderPanel();return;} if(isDk(city)&&!sure){const dk=dkState();if(!dk.retUsed[city]){openModal(`
DE-KICKS Group · Customer Success

Wait! Before you go…

We value our partnership too much to let a little thing like price get in the way.

Retention offer40% off for 6 months

After that, the normal price returns, plus a small loyalty administration fee.

${btn('Stay, take the discount','dkStay',{city},'pink')}${btn('Leave anyway','cancelIx',{city,sure:1},'ghost')}
`);return;}} closeModal();if(S.dk){if(S.dk.m[city]){S.dk.lastQ=S.dk.lastQ||{};S.dk.lastQ[city]={m:S.dk.m[city],h:3,until:S.day+365};}delete S.dk.m[city];delete S.dk.add[city];delete S.dk.ret[city];}delete S.ixp[city];delete S.rs[city];if(S.ixn)delete S.ixn[city];for(const k in S.peers)if(k.endsWith('@'+city))delete S.peers[k];UI.confirm=null;after();}, - rs:({city})=>{if(!isCity(city)||S.ixp[city]===undefined)return;S.rs[city]=!S.rs[city];if(S.rs[city])toast('Route server session up.
You now peer with every open network on this IX, in one go.','good');sfx('build');after();}, + rs:({city})=>{if(!isIx(city)||S.ixp[city]===undefined)return;S.rs[city]=!S.rs[city];if(S.rs[city])toast('Route server session up.
You now peer with every open network on this IX, in one go.','good');sfx('build');after();}, dkAccept:()=>{const dk=dkState(),q=dk.q;if(!q)return;dk.m[q.city]=q.m;dk.q=null;closeModal();ACT.buyIx({city:q.city,tier:q.tier,signed:true});if(S.ixp[q.city]===undefined)delete dk.m[q.city];else toast(`Signed with DE-KICKS.
Welcome to the family. Please don't tell anyone what you pay.`,'good');}, dkHaggle:()=>{const dk=dkState(),q=dk.q;if(!q||q.h>=3)return;q.h++;const r=Math.random(); if(r<0.45){S.stats.haggleWin=1;q.m=+(q.m*(0.75+Math.random()*0.15)).toFixed(2);dkQuoteModal();toast('"Just this once."
Your account manager found a special discount. Do not tell the others.','good');} @@ -1948,15 +2085,17 @@ const ACT={ confGo:({key})=>{S.confReg=S.confReg||{};if(S.confReg[key])return;const cf=upcomingConfs(75).find(x=>x.key===key);if(!cf||cf.day<=S.day)return;if(!spend(CONF_COST))return;S.confReg[key]=true;toast('Registered.
Flights booked, badge printed, business cards ordered in the wrong font.','good');after();}, tutSkip:()=>{S.tut=null;try{localStorage.setItem('sot-tut','1');}catch(e){}renderCoach();}, addSite:({city})=>{const p=S.pops[city];if(!p||p.site2)return;if(!spend(SITE2_COST))return;p.site2=true;p.site2Day=S.day;toast(`Second site live in ${CITY[city].name}.
${esc(siteName(city,'b'))} is joined to ${esc(siteName(city,'a'))} by your own metro ring. Move some uplinks there from the Transit and Peering tabs.`,'good');sfx('build');after();}, - rmSite:({city})=>{const p=S.pops[city];if(!p||!p.site2)return;if(UI.confirm!=='site'+city){UI.confirm='site'+city;renderPanel();return;}UI.confirm=null;p.site2=0;p.sdown=null;p.ringcut=0;for(const t of S.transit)if(t.city===city)t.site='a';for(const x of S.pni)if(x.city===city)x.site='a';if(S.ixSite)delete S.ixSite[city];after();}, + rmSite:({city})=>{const p=S.pops[city];if(!p||!p.site2)return;if(UI.confirm!=='site'+city){UI.confirm='site'+city;renderPanel();return;}UI.confirm=null;p.site2=0;p.sdown=null;p.ringcut=0;for(const t of S.transit)if(t.city===city)t.site='a';for(const x of S.pni)if(x.city===city)x.site='a';if(S.ixSite)for(const x of ixIdsIn(city))delete S.ixSite[x];after();}, siteSet:({k,id,s})=>{if(!['a','b','ab'].includes(s))return; - const o=k==='t'?S.transit.find(x=>x.id===id):k==='p'?S.pni.find(x=>x.id===id):null;if(k!=='ix'&&!o)return;if(k==='ix'&&(!isCity(id)||S.ixp[id]===undefined||S.myIx[id]||!S.pops[id]))return; + const o=k==='t'?S.transit.find(x=>x.id===id):k==='p'?S.pni.find(x=>x.id===id):null;if(k!=='ix'&&!o)return;if(k==='ix'&&(!isIx(id)||S.ixp[id]===undefined||S.myIx[id]||!S.pops[ixCity(id)]))return; const n=()=>k==='ix'?((S.ixn||{})[id]||1):(o.n||1); if(s==='ab'&&n()<2){const before=n();if(k==='t')ACT.lagT({id,d:1});else if(k==='p')ACT.lagP({id,d:1});else ACT.lagIx({city:id,d:1});if(n()<2||n()===before)return;toast(`Second LAG member added.
One member in each building now, so a dark building only takes out half the port.`,'good');} if(k==='ix'){S.ixSite=S.ixSite||{};S.ixSite[id]=s;}else o.site=s;after();}, - peer:({city,net})=>{if(!isCity(city)||!isNet(net)||S.ixp[city]===undefined||!ixMembers(city).includes(net))return;const r=peerOk(net,'ix',city);if(!r.ok){toast(`${esc(NET[net].name)} declined.
${esc(r.why)}`,'bad');sfx('err');return;}S.peers[net+'@'+city]=true; + peer:({city,net})=>{if(!isIx(city)||!isNet(net)||S.ixp[city]===undefined||!ixMembers(city).includes(net))return;const r=peerOk(net,'ix',city);if(!r.ok){toast(`${esc(NET[net].name)} declined.
${esc(r.why)}`,'bad');sfx('err');return;}S.peers[net+'@'+city]=true; toast(`${esc(NET[net].name)} accepted!
${NET[net].pol==='selective'?'They checked your PearingDB page and liked the traffic numbers.':'BGP session established.'}`,'good');sfx('build');after();}, unpeer:({city,net})=>{delete S.peers[net+'@'+city];after();}, + peerAll:({city})=>{if(!isIx(city)||S.ixp[city]===undefined)return;const set=ixSessions(city);let n=0;for(const id of ixMembers(city))if(!set.has(id)&&peerOk(id,'ix',city).ok){S.peers[id+'@'+city]=true;n++;}if(!n)return;toast(`${n} new session${n===1?'':'s'} at ${esc(ixName(city))}.
Small networks, but they add up, and they all count towards the club.`,'good');sfx('build');after();}, + tailTog:()=>{UI.tailOpen=!UI.tailOpen;renderLeft();}, pni:({city,net,tier})=>{tier=+tier;if(!S.pops[city]||!NET[net]||!NET[net].pops.includes(city)||!PORT[tier])return;if(!portOk(city,tier)){toast(`Your router can't take a ${PORT[tier].n} port.
Upgrade it in the Infra tab.`,'bad');sfx('err');return;}const r=peerOk(net,'pni',city);if(!r.ok){toast(`${esc(NET[net].name)} declined the PNI.
${esc(r.why)}`,'bad');sfx('err');return;}if(S.conf&&S.conf.until>S.day)S.stats.beerPni=1; const ex=S.pni.find(p=>p.city===city&&p.net===net);if(ex&&tier<=ex.tier)return;if(!spend((1500+PORT[tier].setup/2)*(ex&&ex.n||1)))return;if(ex)ex.tier=tier;else S.pni.push({id:uid(),city,net,tier}); toast(`PNI with ${esc(NET[net].name)} is up.
A cross-connect in ${esc(CITY[city].dc)}. Private and fast.`,'good');after();}, @@ -1994,8 +2133,8 @@ const ACT={ const km=kmBetween(a,b),sub=isSub(a,b),mo=vxcMo(km,sub,t);if(!spend(mo))return;S.links.push({id:uid(),a,b,kind:'vxc',prov,vt:t,km,sub,mo,cut:0,day:S.day});closeModal(); toast(`Circuit up in 59 seconds.
${VXC[t].n} over ${esc(FAB[prov].name)}: ${CITY[a].name} → ${CITY[b].name}.${S.pops[b]?'':' Now grab an IX port there for remote peering.'}`,'good');if(!S.pops[b])selectCity(b);after();}, upVxc:({id,t})=>{t=+t;const l=S.links.find(x=>x.id===id);if(!l||l.kind!=='vxc'||!VXC[t]||t<=l.vt)return;const extra=VXC[t].g-VXC[l.vt].g;for(const c of [l.a,l.b]){const pt=nniPort(c,l.prov);if(pt&&nniUsed(c,l.prov)+extra>NNI[pt.tier].g){toast(`Fabric port in ${CITY[c].name} is full.`,'bad');sfx('err');return;}}const mo=vxcMo(l.km,l.sub,t);if(!spend(mo))return;l.vt=t;l.mo=mo;after();}, - cancelVxc:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.links=S.links.filter(l=>l.id!==id);const rem=remoteCities();for(const c in S.ixp){if(!S.pops[c]&&!rem.includes(c)){delete S.ixp[c];delete S.rs[c];for(const k in S.peers)if(k.endsWith('@'+c))delete S.peers[k];}}UI.sel=null;UI.confirm=null;after();}, - setPref:({kind,id,v})=>{if(!own(PREF,v))return;if(kind!=='t'&&kind!=='p'&&!(isCity(id)&&S.ixp[id]!==undefined))return;if(kind==='t'){const t=S.transit.find(x=>x.id===id);if(t)t.pref=v;}else if(kind==='p'){const x=S.pni.find(y=>y.id===id);if(x)x.pref=v;}else{S.ixPref=S.ixPref||{};S.ixPref[id]=v;}sfx('click');after();}, + cancelVxc:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.links=S.links.filter(l=>l.id!==id);const rem=remoteCities();for(const c in S.ixp){if(!S.pops[ixCity(c)]&&!rem.includes(ixCity(c))){delete S.ixp[c];delete S.rs[c];for(const k in S.peers)if(k.endsWith('@'+c))delete S.peers[k];}}UI.sel=null;UI.confirm=null;after();}, + setPref:({kind,id,v})=>{if(!own(PREF,v))return;if(kind!=='t'&&kind!=='p'&&!(isIx(id)&&S.ixp[id]!==undefined))return;if(kind==='t'){const t=S.transit.find(x=>x.id===id);if(t)t.pref=v;}else if(kind==='p'){const x=S.pni.find(y=>y.id===id);if(x)x.pref=v;}else{S.ixPref=S.ixPref||{};S.ixPref[id]=v;}sfx('click');after();}, setMetric:({id,v})=>{if(!own(MET,v))return;const l=S.links.find(x=>x.id===id);if(!l)return;for(const x of pairLinks(l.a,l.b))x.metric=v;sfx('click');after();}, goEgress:({city,k})=>{ACT.focusCity({city});UI.tab=k==='t'?'up':k==='l2'?'cust':'peer';renderPanel();}, applyCn:()=>{if(S.cnLic.state!=='none')return;if(!spend(CN_LIC))return;S.cnLic={state:'pending',ready:S.day+45};toast('Application filed.
Your local partner says about 45 days. Probably.','goal');after();}, @@ -2167,8 +2306,10 @@ function renderLeft(){ h+=`
Incidents so far${S.stats.incidents}
Survived with no impact${S.stats.survived}
`; }else{ h+=`

Every network on the map. Traffic share is how much of your users' traffic goes to them.

`; - for(const n of NETS){const st=[];if(S.transit.some(t=>t.net===n.id))st.push('Transit');if(Object.keys(S.ixp).some(c=>ixSessions(c).has(n.id)))st.push('Peered');if(S.pni.some(p=>p.net===n.id))st.push('PNI');if(S.caches.some(c=>c.net===n.id))st.push('Cache'); + const tl=NETS.filter(n=>n.tail),tlOn=tl.filter(n=>Object.keys(S.ixp).some(c=>ixSessions(c).has(n.id))).length; + for(const n of NETS){if(n.tail&&!UI.tailOpen)continue;const st=[];if(S.transit.some(t=>t.net===n.id))st.push('Transit');if(Object.keys(S.ixp).some(c=>ixSessions(c).has(n.id)))st.push('Peered');if(S.pni.some(p=>p.net===n.id))st.push('PNI');if(S.caches.some(c=>c.net===n.id))st.push('Cache'); h+=`
${logo(n)}
${esc(n.name)} AS${n.asn}
${TYPE_L[n.type]} ${n.pol} · ${(NSH[n.id]*100).toFixed(1)}% of traffic${n.price?` · transit $${(n.price*S.priceMul).toFixed(2)}/Gbps`:''}
${esc(n.blurb)}
${st.length?`
${st.map(s=>`${s}`).join('')}
`:''}
`;} + h+=`
The long tail ${tl.length} small networks
${(tl.reduce((a,n)=>a+NSH[n.id],0)*100).toFixed(1)}% of traffic between them, scattered across exchanges. You peer with ${tlOn}.
${btn(UI.tailOpen?'Hide':'Show','tailTog',{},'ghost sm')}
`; } if(h!==UI._lh){UI._lh=h;$('leftBody').innerHTML=h;} } @@ -2195,7 +2336,7 @@ function cityPanel(c){ const fh=FABS.filter(f=>f.cities.includes(c)); if(ix&&fh.length){if(remoteCities().includes(c))h+=ixSection(c).replace('

Internet Exchange

','

Remote peering at the IX

'); else h+=`

Remote peering

Peer at ${esc(ix)} without building a POP. Order a virtual circuit here from one of your POPs over ${fh.map(f=>esc(f.name)).join(' or ')}.

${REMOTE_WARN}${btn('Order circuit anyway','openVxc',{to:c},'ghost sm')}
`;} - h+=`

Who's here

${MEGA.filter(m=>m.c===c).length?`AI and cloud campuses nearby: ${MEGA.filter(m=>m.c===c).map(m=>`${esc(m.n)}`).join(', ')}
`:''}Transit sellers: ${tr.map(n=>`${esc(n.name)}`).join(', ')||'none'}
Fabrics: ${fh.map(f=>`${esc(f.name)}`).join(', ')||'none'}
${ix?`IX members on ${esc(ix)}: ${ixMembers(c).length}`:'No IX here yet. You could found one later.'}
`; + h+=`

Who's here

${MEGA.filter(m=>m.c===c).length?`AI and cloud campuses nearby: ${MEGA.filter(m=>m.c===c).map(m=>`${esc(m.n)}`).join(', ')}
`:''}Transit sellers: ${tr.map(n=>`${esc(n.name)}`).join(', ')||'none'}
Fabrics: ${fh.map(f=>`${esc(f.name)}`).join(', ')||'none'}
${ix?ixIdsIn(c).map(x=>`IX members on ${esc(ixName(x))}: ${ixMembers(x).length}`).join('
'):'No IX here yet. You could found one later.'}
`; return h; } const tabs=[['cust','Customers'],['up','Transit'],['peer','Peering'],['links','Infra']]; @@ -2258,7 +2399,7 @@ function cityPanel(c){
${N?btn(N.lvl>lvl()?`${esc(N.n)} level ${N.lvl}`:`Upgrade to ${esc(N.n)} ${fmt$(N.cost*rt)} + ${fmt$(N.mo*rt)}/mo`,'upRouter',{city:c},'pink',N.lvl>lvl()||S.cash${fmt$(routerCost(g))} + ${fmt$(ROUTER_MO+G.mo)}/mo`,'addRouter',{city:c},'',S.cash1?btn('Remove one','rmRouter',{city:c},'ghost sm'):''}
${N?`

${rt>1?'Rolling upgrade: one router at a time, no downtime.':'With one router, the upgrade needs a maintenance window: this POP goes dark for a day.'}

`:''}

${rt>=2?'A crash here only costs one router’s capacity for a few days.':'One router is a single point of failure.'}

-

Metro diversity

${p.site2?(()=>{const up=s=>[...S.transit.filter(t=>t.city===c&&onSite(t.site,s)).map(t=>NET[t.net].name+' transit'+(t.site==='ab'?' (split)':'')),...S.pni.filter(x=>x.city===c&&onSite(x.site,s)).map(x=>'PNI '+NET[x.net].name+(x.site==='ab'?' (split)':'')),...(S.ixp[c]!==undefined&&onSite((S.ixSite||{})[c],s)?[ixName(c)+' port'+((S.ixSite||{})[c]==='ab'?' (split)':'')]:[]),...(s==='a'?S.caches.filter(x=>x.city===c).map(x=>NET[x.net].cache.name):[])]; +

Metro diversity

${p.site2?(()=>{const up=s=>[...S.transit.filter(t=>t.city===c&&onSite(t.site,s)).map(t=>NET[t.net].name+' transit'+(t.site==='ab'?' (split)':'')),...S.pni.filter(x=>x.city===c&&onSite(x.site,s)).map(x=>'PNI '+NET[x.net].name+(x.site==='ab'?' (split)':'')),...ixIdsIn(c).filter(x=>S.ixp[x]!==undefined&&!S.myIx[x]&&onSite((S.ixSite||{})[x],s)).map(x=>ixName(x)+' port'+((S.ixSite||{})[x]==='ab'?' (split)':'')),...(s==='a'?S.caches.filter(x=>x.city===c).map(x=>NET[x.net].cache.name):[])]; const row=s=>{const dn=siteDown(c,s),u=up(s);return `
${esc(siteName(c,s))}${dn?' DOWN':''}
${u.length?esc(u.join(', ')):'Nothing plugged in here yet'}
`;}; return `

Two buildings joined by your own metro ring. A power cut or cleaner in one leaves the other running at half capacity. Uplinks only work while their site is up, unless you split them: choose Both on a port to put LAG members in each building.

${row('a')}${row('b')}${up('b').length&&up('a').length?'':`

Everything is in one building. Move some uplinks to the other site from the Transit and Peering tabs.

`}
Second site and metro ring${fmt$(SITE2_MO)}/mo
${btn(UI.confirm==='site'+c?'Really close it?':'Close site B','rmSite',{city:c},'ghost sm')}
`;})() :`

Right now ${esc(CITY[c].name)} is one building. A power cut, an A/C failure or a cleaner with a vacuum takes the whole city dark, and a second router does not help with that. A second data center across town, joined by your own metro ring, keeps half the POP up.

${btn(`Add a second site ${fmt$(SITE2_COST)} + ${fmt$(SITE2_MO)}/mo`,'addSite',{city:c},'pink',S.cash`}
@@ -2280,21 +2421,25 @@ function cityPanel(c){ } return h+``; } -function ixSection(c){const C=CITY[c],ix=ixName(c);let h=''; - h+=`

Internet Exchange

`; +function ixSection(c){const ids=ixIdsIn(c);if(ids.length<2)return ixBlock(c,false); + let h=`

Internet Exchanges

${ids.length} exchanges compete in ${esc(CITY[c].name)}. Members overlap, but not completely, and the challengers undercut the incumbent. Small networks often sit on just one of them.

`; + for(const x of ids)h+=ixBlock(x,true);return h;} +function ixBlock(c,multi){const city=ixCity(c),C=CITY[city],ix=ixName(c),X=XIXM[c];let h=''; + h+=`

${multi?esc(ix)+(X?' challenger':' incumbent'):'Internet Exchange'}

`; if(!ix&&C.cn){h+=`

Running an exchange in mainland China takes a different license entirely. Peer with Chinese networks over PNIs, or meet them in Hong Kong.

`;} - else if(!ix){h+=`

There's no IX in ${C.name} yet. Found one: networks join over time, pay you for ports, and peer with you for free.

${S.pops[c]?btn(`Found your own IX ${fmt$(MYIX_COST)} + ${fmt$(MYIX_MO)}/mo`,'foundIx',{city:c},'pink',S.cashBuild a POP here first.

'}`;} - else if(S.ixp[c]===undefined){h+=`

${esc(ix)} is a shared switch. One port lets you peer with every member for free. Members: ${ixMembers(c).map(id=>esc(NET[id].name)).join(', ')||'nobody yet'}.

${S.pops[c]?'':REMOTE_WARN}${CITY[c].ixCheap?`

Run by a nonprofit. Public prices at a fraction of what other exchanges charge, and almost everyone is here.

`:''}${isDk(c)?`

Run by DE-KICKS Group. No public price list. Ask sales for a personalised quote and bring your haggling face.

`:''}
${PORT.map((P2,i)=>btn(`${P2.n} port ${isDk(c)?'Price on request ☎':fmt$(ixPortMo(c,i))+'/mo'}`,'buyIx',{city:c,tier:i},'',(!isDk(c)&&S.cash1))).join('')}
`;} + else if(!ix){h+=`

There's no IX in ${C.name} yet. Found one: networks join over time, pay you for ports, and peer with you for free.

${S.pops[city]?btn(`Found your own IX ${fmt$(MYIX_COST)} + ${fmt$(MYIX_MO)}/mo`,'foundIx',{city:c},'pink',S.cashBuild a POP here first.

'}`;} + else if(S.ixp[c]===undefined){h+=`

${esc(ix)} is a shared switch. One port lets you peer with every member for free. Members: ${(()=>{const m=ixMembers(c),big=m.filter(id=>!NET[id].tail),t=m.length-big.length;return (big.map(id=>esc(NET[id].name)).join(', ')||'nobody yet')+(t?`, plus ${t} small network${t===1?'':'s'}`:'');})()}.

${S.pops[city]?'':REMOTE_WARN}${X?`

${esc(X.blurb)} Ports at ${Math.round(ixMul(c)*100)}% of the usual price.

`:''}${CITY[city].ixCheap?`

Run by a nonprofit. Public prices at a fraction of what other exchanges charge, and almost everyone is here.

`:''}${isDk(c)?`

Run by DE-KICKS Group. No public price list. Ask sales for a personalised quote and bring your haggling face.

`:''}
${PORT.map((P2,i)=>btn(`${P2.n} port ${isDk(c)?'Price on request ☎':fmt$(ixPortMo(c,i))+'/mo'}`,'buyIx',{city:c,tier:i},'',(!isDk(c)&&S.cash1))).join('')}
`;} else{const mine=!!S.myIx[c],u=R.useIx[c]||0,cap=ixCap(c),set=ixSessions(c),xdown=S.ev.ixdown&&S.ev.ixdown[c]>S.day; - h+=`
${mine?`Your own fabric · ${myFab(c).n}`:lagName(S.ixp[c],(S.ixn||{})[c])}${xdown?' · FABRIC DOWN':''}${fmtG(u)}
${prefCtl('ix',c,S.ixPref&&S.ixPref[c])}${S.pops[c]?siteCtl('ix',c,c,(S.ixSite||{})[c]):''}`; + h+=`
${mine?`Your own fabric · ${myFab(c).n}`:lagName(S.ixp[c],(S.ixn||{})[c])}${xdown?' · FABRIC DOWN':''}${fmtG(u)}
${prefCtl('ix',c,S.ixPref&&S.ixPref[c])}${S.pops[city]?siteCtl('ix',c,city,(S.ixSite||{})[c]):''}`; if(isDk(c)&&S.dk){const ad=S.dk.add[c]||[],rt=S.dk.ret[c];h+=`

DE-KICKS personalised pricing: ${Math.round(dkMult(c)*100)}% of what a normal IX would charge${rt&&rt>S.day?` (promo, ${rt-S.day} days left)`:''}.

`; for(const x of ad)h+=`
${esc(x.n)}
${esc(x.blurb)} · ${fmt$(x.mo)}/mo
${btn(UI.confirm==='dk'+c+x.n?'Lose exclusive benefits?':'Opt out','dkOptOut',{city:c,n:x.n},'ghost sm')}
`;} if(isRemote(c))h+=`

Remote port via a reseller: 1.5× price, 80% usable, and ${ixMembers(c).filter(noRemote).length} member${ixMembers(c).filter(noRemote).length===1?'':'s'} here refuse remote peers.

`; if(mine){const f=S.myIx[c].fab|0,N=MYIX_FAB[f+1];h+=`
Members paying you${S.myIx[c].members.length} of up to ${myFab(c).max} · ${fmt$(S.myIx[c].members.length*MYIX_FEE)}/mo
${N?`
${btn(N.lvl>lvl()?`${N.n} fabric level ${N.lvl}`:`Upgrade fabric to ${N.n} ${fmt$(N.cost)} + ${fmt$(N.mo)}/mo`,'myIxUp',{city:c},'pink sm',N.lvl>lvl()||S.cash

A bigger fabric carries more traffic and has room for more members. Your router here still has to keep up.

`:'

Biggest fabric money can buy.

'}`;} - else h+=`
${PORT.map((P2,i)=>i>S.ixp[c]?btn(`Upgrade ${P2.n} ${fmt$(ixPortMo(c,i)*((S.ixn||{})[c]||1))}/mo`,'buyIx',{city:c,tier:i},'sm',(!!S.pops[c]&&!portOk(c,i))||(!S.pops[c]&&i>1)):'').join('')}${S.pops[c]&&((S.ixn||{})[c]||1)${fmt$(ixPortMo(c,S.ixp[c]))}/mo`,'lagIx',{city:c,d:1},'sm',S.cash1?btn('− member','lagIx',{city:c,d:-1},'ghost sm'):''}${btn(S.rs[c]?'Leave route server':'Join route server','rs',{city:c},S.rs[c]?'ghost sm':'pink sm')}${btn(UI.confirm==='ix'+c?'Really leave?':'Leave IX','cancelIx',{city:c},'ghost sm')}
`; + else h+=`
${PORT.map((P2,i)=>i>S.ixp[c]?btn(`Upgrade ${P2.n} ${fmt$(ixPortMo(c,i)*((S.ixn||{})[c]||1))}/mo`,'buyIx',{city:c,tier:i},'sm',(!!S.pops[city]&&!portOk(city,i))||(!S.pops[city]&&i>1)):'').join('')}${S.pops[city]&&((S.ixn||{})[c]||1)${fmt$(ixPortMo(c,S.ixp[c]))}/mo`,'lagIx',{city:c,d:1},'sm',S.cash1?btn('− member','lagIx',{city:c,d:-1},'ghost sm'):''}${btn(S.rs[c]?'Leave route server':'Join route server','rs',{city:c},S.rs[c]?'ghost sm':'pink sm')}${btn(UI.confirm==='ix'+c?'Really leave?':'Leave IX','cancelIx',{city:c},'ghost sm')}
`; h+=`
`; - for(const id of ixMembers(c)){const n=NET[id],on=set.has(id),viaRs=on&&!S.peers[id+'@'+c]&&!mine,chk=peerOk(id,'ix',c); - h+=`
${logo(n)}
${esc(n.name)}
${TYPE_L[n.type]} ${n.pol} · ${(NSH[id]*100).toFixed(0)}%
${!on&&!chk.ok?`
${esc(chk.why)}
`:''}
+ {const elig=mine?[]:ixMembers(c).filter(id=>!set.has(id)&&peerOk(id,'ix',c).ok);if(elig.length>1)h+=`
${btn(`Request all ${elig.length} willing peers`,'peerAll',{city:c},'pink sm')}
`;} + for(const id of ixMembers(c).sort((a,b)=>NSH[b]-NSH[a])){const n=NET[id],on=set.has(id),viaRs=on&&!S.peers[id+'@'+c]&&!mine,chk=peerOk(id,'ix',c); + h+=`
${logo(n)}
${esc(n.name)}
${TYPE_L[n.type]} ${n.pol} · ${(NSH[id]*100).toFixed(NSH[id]<0.01?1:0)}%${n.tail?' tiny':''}
${!on&&!chk.ok?`
${esc(chk.why)}
`:''}
${on?(viaRs||mine?`${mine?'Member':'via RS'}`:btn('Peered ✓','unpeer',{city:c,net:id},'green sm',false,'Click to tear down')):btn('Request','peer',{city:c,net:id},'sm',!chk.ok)}
`;} h+=`
`;} h+=`
`;return h; @@ -2387,8 +2532,8 @@ function svgChart(rows,stackKeys,lines,fmtY){ return `${g}`;} // For a network you currently reach over transit: the cheapest way to move it to peering. function offTransitHint(id,city){const n=NET[id];if(n.type==='t1')return 'Tier 1: only a PNI, and only once you are big enough for the Tier 1 club'; - const ixc=Object.keys(S.pops).filter(c=>ixMembers(c).includes(id)),here=city&&ixMembers(city).includes(id)?city:null,pick1=here||ixc[0]; - if(n.pol==='open')return pick1?`Open peer: join the route server at ${ixName(pick1)}${here?'':' ('+CITY[pick1].name+')'}`:'Open peer, but not on any IX where you have a POP'; + const ixc=Object.keys(S.pops).flatMap(ixIdsIn).filter(x=>ixMembers(x).includes(id)),here=city&&ixIdsIn(city).find(x=>ixMembers(x).includes(id))||null,pick1=here||ixc.find(x=>S.ixp[x]!==undefined)||ixc[0]; + if(n.pol==='open')return pick1?`Open peer: join the route server at ${ixName(pick1)}${here?'':' ('+CITY[ixCity(pick1)].name+')'}`:'Open peer, but not on any IX where you have a POP'; if(n.pol==='paid')return `Paid peering only: a PNI costs ${fmt$(n.paidFee)}/mo`; const pniC=Object.keys(S.pops).filter(c=>n.pops.includes(c));const ixOk=pick1?peerOk(id,'ix',pick1):null,pOk=pniC.length?peerOk(id,'pni',pniC.includes(city)?city:pniC[0]):null; if(pOk&&pOk.ok)return `Ready for a PNI in ${CITY[pniC.includes(city)?city:pniC[0]].name}`; @@ -2407,10 +2552,13 @@ function renderDash(){

Money per month

${svgChart(rows,[],[{k:'rev',col:'#16A866'},{k:'cost',col:'#FF4D5E'}],v=>fmt$(v))}
RevenueCosts

Where the money goes

${Object.entries(R.cost).filter(([k,v])=>v>0).sort((a,b)=>b[1]-a[1]).map(([k,v])=>`
${{pops:'POPs and routers',links:'Waves and fiber',transit:'Transit',ix:'IX ports',pni:'PNIs',caches:'Cache power',nni:'Fabric ports',optical:'Amp huts and spares',loans:'Loan repayments',revshare:'Investor revenue share',extras:'Licenses and scrubbing'}[k]||k}${fmt$(v)}/mo
`).join('')}
`; const tT=(R.egT.t||0)||1; - const nets=NETS.map(n=>{const e=R.netEg[n.id]||{c:0,p:0,ix:0,t:0};const t=e.c+e.p+e.ix+e.t,want=R.demTo[n.id]||0;return {n,e,t,cost:(R.cost.transit||0)*e.t/tT,lost:want>0.01?Math.max(0,1-t/want):0};}).filter(x=>x.t>0.01||R.demTo[x.n.id]>0.01); + const row=(n,e,want)=>{const t=e.c+e.p+e.ix+e.t;return {n,e,t,want,cost:(R.cost.transit||0)*e.t/tT,lost:want>0.01?Math.max(0,1-t/want):0};}; + const nets=NETS.filter(n=>!n.tail).map(n=>row(n,R.netEg[n.id]||{c:0,p:0,ix:0,t:0},R.demTo[n.id]||0)); + {const e={c:0,p:0,ix:0,t:0};let w=0;for(const n of NETS)if(n.tail){const x=R.netEg[n.id];if(x)for(const k in e)e[k]+=x[k]||0;w+=R.demTo[n.id]||0;}nets.push(row({id:'_tail',name:'The long tail ('+NETS.filter(n=>n.tail).length+' small networks)',asn:'many',type:'eye',col:'#8A93B8'},e,w));} + for(let i=nets.length-1;i>=0;i--)if(!(nets[i].t>0.01||nets[i].want>0.01))nets.splice(i,1); {const k=UI.dashSort||'traffic',dir=UI.dashDir||-1,val=x=>k==='name'?x.n.name.toLowerCase():k==='asn'?x.n.asn:k==='type'?x.n.type:k==='cost'?x.cost:k==='lost'?x.lost:x.t;nets.sort((a,b)=>{const A=val(a),B=val(b);return (AB?1:0)*dir||b.t-a.t;});} h+=`

Traffic by network (ASN)

Where your users' traffic comes from, and how it gets to you. Transit is the only part you pay per gigabit; caches, PNIs and IX peering are free or flat-rate. Tap a column to sort.

${['c','p','ix','t'].map(k=>`${EGC[k][0]}`).join('')}
${[['name','Network',''],['asn','AS',''],['type','Type',''],['traffic','Traffic','r'],['mix','How it arrives',''],['cost','Transit cost','r'],['lost','Lost','r']].map(([k,l,c])=>``).join('')} - ${nets.map(({n,e,t})=>{const want=R.demTo[n.id]||0;return ``;}).join('')}
${k==='mix'?l:``}
${logo(n)}${esc(n.name)}${n.asn}${TYPE_L[n.type]}${fmtG(t)}
${['c','p','ix','t'].map(k=>``).join('')}
${e.t>0.01?fmt$((R.cost.transit||0)*e.t/tT)+'/mo':'—'}${want>0.01?pct(Math.max(0,1-t/want)):'—'}
`; + ${nets.map(({n,e,t,want})=>{return `${logo(n)}${esc(n.name)}${n.asn}${TYPE_L[n.type]}${fmtG(t)}
${['c','p','ix','t'].map(k=>``).join('')}
${e.t>0.01?fmt$((R.cost.transit||0)*e.t/tT)+'/mo':'—'}${want>0.01?pct(Math.max(0,1-t/want)):'—'}`;}).join('')}`; {const top=transitTop(S.transit.map(t=>t.id),8);if(top.length)h+=`

Who your transit carries

The networks you pay transit to reach, biggest first, and the cheapest way to move each one to peering. This is your to-do list on the way to Tier 1.

${top.map(([id,v])=>`
${logo(NET[id])}
${esc(NET[id].name)} AS${NET[id].asn} · ${fmtG(v)} · about ${fmt$((R.cost.transit||0)*v/tT)}/mo
${esc(offTransitHint(id))}
`).join('')}
`;} const ls=S.links.filter(l=>capOf(l)>0).map(l=>({l,u:(R.load[l.id]||0)/capOf(l)})).sort((a,b)=>b.u-a.u).slice(0,8); const rs=Object.keys(S.pops).map(c=>({c,u:(R.nodeLoad[c]||0)/(R.nodeCap[c]||1)})).sort((a,b)=>b.u-a.u).slice(0,6); @@ -2762,7 +2910,7 @@ function drawCity(C,sx,sy,sc,now,lyOverride){ ctx.translate(0,-2); } const ixn=ixName(C.id); - if(ixn){const mine=!!S.myIx[C.id],joined=S.ixp[C.id]!==undefined;const ixHot=hot&&hot.ix;ctx.fillStyle=ixHot?(Math.sin(now/180)>0?'#FF4D5E':'#FF8A3D'):mine?'#FF4F9A':joined?'#FFD23F':'#FFFFFF';ctx.beginPath();for(let i=0;i<6;i++){const a=Math.PI/3*i+Math.PI/6;ctx.lineTo(19+8.5*Math.cos(a),-h+2+8.5*Math.sin(a));}ctx.closePath();ctx.fill();ctx.lineWidth=2;ctx.stroke(); + if(ixn){const mine=!!S.myIx[C.id],joined=hasIxAt(C.id);const ixHot=hot&&hot.ix;ctx.fillStyle=ixHot?(Math.sin(now/180)>0?'#FF4D5E':'#FF8A3D'):mine?'#FF4F9A':joined?'#FFD23F':'#FFFFFF';ctx.beginPath();for(let i=0;i<6;i++){const a=Math.PI/3*i+Math.PI/6;ctx.lineTo(19+8.5*Math.cos(a),-h+2+8.5*Math.sin(a));}ctx.closePath();ctx.fill();ctx.lineWidth=2;ctx.stroke(); ctx.fillStyle=mine||ixHot?'#fff':'#1E2640';ctx.font='900 8px Nunito, sans-serif';ctx.textAlign='center';ctx.textBaseline='middle';ctx.fillText('IX',19,-h+2.5);} if(hot&&p){let y=-14;const pulse=.75+.25*Math.sin(now/200);for(const k of ['r','t','p','c']){if(!hot[k])continue;ctx.globalAlpha=pulse;ctx.fillStyle='#FF4D5E';ctx.beginPath();ctx.arc(-29,y,6.5,0,7);ctx.fill();ctx.globalAlpha=1;ctx.lineWidth=2;ctx.strokeStyle='#1E2640';ctx.stroke();ctx.fillStyle='#fff';ctx.font='900 8px Nunito, sans-serif';ctx.textAlign='center';ctx.textBaseline='middle';ctx.fillText(HOTL[k],-29,y+0.5);y+=14;}} const off=S.offers.some(o=>bCities(o).includes(C.id)); diff --git a/tests/game.test.js b/tests/game.test.js index 1afd976..f211802 100644 --- a/tests/game.test.js +++ b/tests/game.test.js @@ -101,7 +101,7 @@ test('LAGs add members, capacity and cost to transit, IX ports and PNIs', () => ev("const t=S.transit[0];window.__c0=S.cash;ACT.lagT({id:t.id,d:1});ACT.lagT({id:t.id,d:1});ACT.lagIx({city:'fra',d:1});compute()"); assert.equal(ev('S.transit[0].n'), 3); assert.equal(ev("S.ixn.fra"), 2); - assert.equal(ev("__c0-S.cash"), 1500 * 2 + 1500, 'two transit members and one IX member were charged'); + assert.equal(ev("__c0-S.cash"), 1500 * 2 + ev("ixPortMo('fra',1)"), 'two transit members and one IX member were charged'); assert.equal(ev("ixCap('fra')"), 190); assert.equal(ev("R.cost.transit>0"), true); ev("ACT.buyTransit({city:'fra',net:'cog',tier:2})"); diff --git a/tests/peering.test.js b/tests/peering.test.js index 4e1ee8a..b3f5d54 100644 --- a/tests/peering.test.js +++ b/tests/peering.test.js @@ -56,7 +56,7 @@ test('remote peering is offered but costs more, gives less and gets refused more const txt = () => ev("document.getElementById('panelBody').textContent"); ev("ACT.buyIx({city:'ams',tier:1});compute()"); assert.equal(ev("isRemote('ams')"), true); - assert.equal(ev("ixPortMo('ams',1)"), ev("Math.round(PORT[1].ix*1.5)"), 'reseller markup'); + assert.equal(ev("ixPortMo('ams',1)"), ev("Math.round(PORT[1].ix*1.5*ixMul('ams'))"), 'reseller markup'); assert.equal(ev("ixCap('ams')"), ev("PORT[1].g*0.8"), 'oversubscribed port'); const refusers = JSON.parse(ev("JSON.stringify(ixMembers('ams').filter(id=>noRemote(id)&&!snub(id,'ams')))")); assert.ok(refusers.length > 0, 'some members refuse remote peers'); @@ -83,7 +83,7 @@ test('DE-KICKS hides prices, haggles, harmonises upwards, auto-enrolls add-ons a assert.match(ev("document.getElementById('modalCard').textContent"), /Confidential/); ev("S.dk.q.m=1.5;ACT.dkAccept()"); assert.equal(ev("S.ixp.fra"), 1); - assert.equal(ev("ixPortMo('fra',1)"), ev("Math.round(PORT[1].ix*1.5)")); + assert.equal(ev("ixPortMo('fra',1)"), ev("Math.round(PORT[1].ix*1.5*ixMul('fra'))")); // haggling always moves something ev("S.dk.q={city:'mad',tier:1,m:1.5,h:0}"); for (let i = 0; i < 3; i++) ev("if(S.dk.q)ACT.dkHaggle()"); @@ -110,6 +110,6 @@ test('DE-KICKS hides prices, haggles, harmonises upwards, auto-enrolls add-ons a ev("ACT.cancelIx({city:'fra'});ACT.cancelIx({city:'fra'})"); assert.equal(ev("S.ixp.fra"), undefined, 'second time you can actually leave'); ev("ACT.buildPop({city:'ams'})"); - assert.equal(ev("ixPortMo('ams',1)"), ev("PORT[1].ix"), 'other IXs keep open pricing'); + assert.equal(ev("ixPortMo('ams',1)"), ev("Math.round(PORT[1].ix*ixMul('ams'))"), 'other IXs keep open pricing'); assert.deepEqual(errors, []); }); diff --git a/tests/regions.test.js b/tests/regions.test.js index 0ec0e43..538f5bd 100644 --- a/tests/regions.test.js +++ b/tests/regions.test.js @@ -229,3 +229,61 @@ test('the Gulf: Saudi licences, and a spat that cuts Qatar off from its neighbou assert.equal(ev("cablesOk('cai','jed').length+cablesOk('jed','bom').length"), 0, 'the Red Sea crisis covers Egypt and Jeddah too'); assert.deepEqual(errors, []); }); + +test('Italy, Portugal, Greece and more US cities are on the map and wired up', () => { + const { ev, errors } = load(); + for (const c of ['mil', 'rom', 'pmo', 'lis', 'ath', 'atn', 'den', 'phx', 'bos', 'hou', 'slc']) { + assert.ok(ev(`!!CITY.${c}`), c); + assert.ok(ev(`NETS.filter(n=>n.price&&n.pops.includes('${c}')).length`) >= 2, `${c} has transit sellers`); + } + for (const [a, b] of [['lis', 'for'], ['lis', 'atn'], ['mil', 'pmo'], ['pmo', 'cai'], ['ath', 'ist'], ['bos', 'dub']]) + assert.ok(ev(`cablesFor('${a}','${b}').length`) > 0, `${a}-${b} cable`); + assert.deepEqual(errors, []); +}); + +test('network ids are unique, and the long tail is small and spread over exchanges', () => { + const { ev } = load(); + assert.equal(ev("new Set(NETS.map(n=>n.id)).size===NETS.length"), true); + const tail = ev("NETS.filter(n=>n.tail).length"); + assert.ok(tail >= 50, `${tail} small peers`); + assert.ok(ev("NETS.filter(n=>n.tail).every(n=>n.share<=0.003&&n.pops.every(c=>CITY[c]&&!CITY[c].ixOnly))")); + assert.ok(ev("NETS.filter(n=>n.tail&&n.ix.some(x=>x.includes('~'))).length") >= 5, 'some only sit on challenger IXs'); +}); + +test('several exchanges per city: overlapping members, cheaper challengers, separate ports', () => { + const { ev, errors } = load(); + ev("ACT.start({});S.cash=1e8;for(const g of GOALS)S.done[g.id]=0;ACT.buildPop({city:'ams'})"); + assert.deepEqual(JSON.parse(ev("JSON.stringify(ixIdsIn('ams'))")), ['ams', 'ams~2', 'ams~3']); + const a = JSON.parse(ev("JSON.stringify(ixMembers('ams'))")), b = JSON.parse(ev("JSON.stringify(ixMembers('ams~2'))")); + assert.ok(a.some(x => b.includes(x)), 'shared members'); + assert.ok(b.some(x => !a.includes(x)) && a.some(x => !b.includes(x)), 'and different ones'); + assert.ok(ev("ixPortMo('ams~2',1)") < ev("ixPortMo('ams',1)"), 'challenger is cheaper'); + ev("ACT.buyIx({city:'ams~2',tier:1});ACT.rs({city:'ams~2'});compute()"); + assert.equal(ev("S.ixp['ams~2']"), 1); + assert.equal(ev("S.ixp.ams"), undefined); + assert.ok(ev("ixSessions('ams~2').size") > 3); + assert.ok(ev("R.sessions") > 3); + ev("ACT.peerAll({city:'ams~2'})"); + ev("selectCity('ams');ACT.tab({t:'peer'})"); + const t = ev("document.getElementById('panelBody').textContent"); + assert.match(t, /3 exchanges compete/); + assert.match(t, /NL-Nyx/); + ev("save();load2=JSON.parse(localStorage.getItem('sot-save-v1'));sanitize(load2)"); + assert.equal(ev("load2.ixp['ams~2']"), 1, 'saves keep challenger ports'); + ev("ACT.cancelIx({city:'ams~2'});ACT.cancelIx({city:'ams~2'})"); + assert.equal(ev("S.ixp['ams~2']"), undefined); + assert.equal(ev("Object.keys(S.peers).some(k=>k.endsWith('@ams~2'))"), false); + assert.deepEqual(errors, []); +}); + +test('Voda-Phony only peers for money now, and EU price wars cut port prices', () => { + const { ev, errors } = load(); + ev("ACT.start({});S.cash=1e8;for(const g of GOALS)S.done[g.id]=0;ACT.buildPop({city:'ams'})"); + assert.equal(ev("NET.vdp.pol"), 'paid'); + assert.equal(ev("peerOk('vdp','ix','ams').ok"), false); + assert.ok(ev("peerOk('vdp','pni','ams').fee") > 0); + assert.ok(ev("ixPortMo('ams',1)") < ev("PORT[1].ix"), 'EU ports are cheaper'); + ev("ACT.buyIx({city:'ams',tier:1});const before=ixPortMo('ams',1);const r=Math.random;Math.random=()=>0;ixPriceWar(S.day);Math.random=r;window.__b=before"); + assert.ok(ev("ixPortMo('ams',1)") < ev("__b"), 'price cut'); + assert.deepEqual(errors, []); +});