Connectivity prices for the 47 cities that had no data (#94)
This commit is contained in:
parent
e3534cad4b
commit
837c56c13e
2 changed files with 55 additions and 2 deletions
|
|
@ -1,15 +1,18 @@
|
||||||
/* Real-world calibration, pulled 2026-10-25 (Pacific islands 2026-10-26). Per city: [carrier-neutral facilities, network presences across them,
|
/* Real-world calibration, pulled 2026-10-25 (Pacific islands 2026-10-26). Per city: [carrier-neutral facilities, network presences across them,
|
||||||
ASNs registered in its country]. Facilities and presences are PeeringDB facilities within 50 km or in the same city
|
ASNs registered in its country]. Facilities and presences are PeeringDB facilities within 50 km or in the same city
|
||||||
(peeringdb.com/api/fac, net_count summed); ASNs per country are from bgp.he.net/report/world.
|
(peeringdb.com/api/fac, net_count summed); ASNs per country are from bgp.he.net/report/world.
|
||||||
A city missing here keeps the plain regional price. One entry per line, sorted by id. */
|
Cities PeeringDB barely knows (added 2026-10-28) are marked: est. is an estimate from what is known to be there, with
|
||||||
|
the country's ASN count. A city missing here keeps the plain regional price. One entry per line, sorted by id. */
|
||||||
const CITY_PDB={
|
const CITY_PDB={
|
||||||
abj:[5,11,32],
|
abj:[5,11,32],
|
||||||
acc:[7,78,124],
|
acc:[7,78,124],
|
||||||
add:[2,3,10],
|
add:[2,3,10],
|
||||||
|
adl:[6,70,3196], // est.
|
||||||
aju:[4,3,9693],
|
aju:[4,3,9693],
|
||||||
akl:[27,398,755],
|
akl:[27,398,755],
|
||||||
alg:[0,0,16],
|
alg:[0,0,16],
|
||||||
ams:[69,2731,1827],
|
ams:[69,2731,1827],
|
||||||
|
anc:[3,12,33300], // est.
|
||||||
apw:[0,0,11],
|
apw:[0,0,11],
|
||||||
ash:[86,1010,33300],
|
ash:[86,1010,33300],
|
||||||
asu:[3,8,124],
|
asu:[3,8,124],
|
||||||
|
|
@ -17,11 +20,13 @@ const CITY_PDB={
|
||||||
atn:[42,589,33300],
|
atn:[42,589,33300],
|
||||||
auh:[4,1,231],
|
auh:[4,1,231],
|
||||||
bcn:[13,159,1341],
|
bcn:[13,159,1341],
|
||||||
|
bda:[2,8,25], // est.
|
||||||
bde:[0,0,4027],
|
bde:[0,0,4027],
|
||||||
beg:[7,49,227],
|
beg:[7,49,227],
|
||||||
bel:[3,7,9693],
|
bel:[3,7,9693],
|
||||||
ber:[22,351,3705],
|
ber:[22,351,3705],
|
||||||
bet:[16,174,152],
|
bet:[16,174,152],
|
||||||
|
bgi:[1,5,20], // est.
|
||||||
bhz:[13,40,9693],
|
bhz:[13,40,9693],
|
||||||
bkk:[32,397,675],
|
bkk:[32,397,675],
|
||||||
blr:[14,104,6412],
|
blr:[14,104,6412],
|
||||||
|
|
@ -30,6 +35,7 @@ const CITY_PDB={
|
||||||
bom:[59,1050,6412],
|
bom:[59,1050,6412],
|
||||||
bos:[31,209,33300],
|
bos:[31,209,33300],
|
||||||
bru:[33,328,443],
|
bru:[33,328,443],
|
||||||
|
brw:[0,0,33300], // est.
|
||||||
bsb:[14,108,9693],
|
bsb:[14,108,9693],
|
||||||
bud:[6,146,369],
|
bud:[6,146,369],
|
||||||
bue:[28,372,1357],
|
bue:[28,372,1357],
|
||||||
|
|
@ -41,15 +47,18 @@ const CITY_PDB={
|
||||||
cas:[2,2,39],
|
cas:[2,2,39],
|
||||||
cau:[2,2,9693],
|
cau:[2,2,9693],
|
||||||
cbo:[1,0,33],
|
cbo:[1,0,33],
|
||||||
|
cbr:[5,60,3196], // est.
|
||||||
ccs:[6,32,296],
|
ccs:[6,32,296],
|
||||||
cgb:[4,5,9693],
|
cgb:[4,5,9693],
|
||||||
cgr:[4,4,9693],
|
cgr:[4,4,9693],
|
||||||
|
chc:[4,30,755], // est.
|
||||||
chi:[64,809,33300],
|
chi:[64,809,33300],
|
||||||
cor:[2,29,1357],
|
cor:[2,29,1357],
|
||||||
cph:[30,290,529],
|
cph:[30,290,529],
|
||||||
cpq:[19,65,9693],
|
cpq:[19,65,9693],
|
||||||
cpt:[6,267,879],
|
cpt:[6,267,879],
|
||||||
cpv:[4,12,9693],
|
cpv:[4,12,9693],
|
||||||
|
cur:[3,20,25], // est.
|
||||||
cwb:[11,79,9693],
|
cwb:[11,79,9693],
|
||||||
cxj:[2,3,9693],
|
cxj:[2,3,9693],
|
||||||
dac:[30,107,2105],
|
dac:[30,107,2105],
|
||||||
|
|
@ -58,26 +67,37 @@ const CITY_PDB={
|
||||||
del:[31,479,6412],
|
del:[31,479,6412],
|
||||||
den:[28,310,33300],
|
den:[28,310,33300],
|
||||||
dkr:[2,4,23],
|
dkr:[2,4,23],
|
||||||
|
dks:[0,0,6683], // est.
|
||||||
dla:[3,14,34],
|
dla:[3,14,34],
|
||||||
doh:[6,29,31],
|
doh:[6,29,31],
|
||||||
drw:[3,15,3196],
|
drw:[3,15,3196],
|
||||||
dub:[21,277,350],
|
dub:[21,277,350],
|
||||||
dur:[4,137,879],
|
dur:[4,137,879],
|
||||||
|
dus:[13,350,3705], // 14 listed, one closed; Digital Realty DUS1-3 alone has 141 networks
|
||||||
|
dut:[0,0,33300], // est.
|
||||||
dxb:[8,135,231],
|
dxb:[8,135,231],
|
||||||
|
dyr:[0,0,6683], // est.
|
||||||
|
ebj:[1,5,529], // est.
|
||||||
edi:[4,46,4027],
|
edi:[4,46,4027],
|
||||||
|
fdf:[1,5,10], // est.
|
||||||
fec:[5,4,9693],
|
fec:[5,4,9693],
|
||||||
fih:[7,19,57],
|
fih:[7,19,57],
|
||||||
fln:[5,23,9693],
|
fln:[5,23,9693],
|
||||||
for:[16,362,9693],
|
for:[16,362,9693],
|
||||||
fra:[56,2450,3705],
|
fra:[56,2450,3705],
|
||||||
fuj:[1,49,231],
|
fuj:[1,49,231],
|
||||||
|
fuk:[5,50,1330], // QTnet QD3 has 14 networks, BBIX Fukuoka is there; the rest est.
|
||||||
gbe:[1,2,39],
|
gbe:[1,2,39],
|
||||||
gdl:[4,22,814],
|
gdl:[4,22,814],
|
||||||
|
gdx:[1,2,6683], // est.
|
||||||
gua:[5,16,103],
|
gua:[5,16,103],
|
||||||
gum:[6,28,11],
|
gum:[6,28,11],
|
||||||
gyn:[5,28,9693],
|
gyn:[5,28,9693],
|
||||||
ham:[26,228,3705],
|
ham:[26,228,3705],
|
||||||
|
hav:[0,0,8], // est.: no neutral data center
|
||||||
|
hba:[2,10,3196], // est.
|
||||||
hel:[23,232,427],
|
hel:[23,232,427],
|
||||||
|
hfx:[3,20,2595], // est.
|
||||||
hir:[1,0,11],
|
hir:[1,0,11],
|
||||||
hkg:[57,1107,1514],
|
hkg:[57,1107,1514],
|
||||||
hnl:[7,33,33300],
|
hnl:[7,33,33300],
|
||||||
|
|
@ -87,15 +107,20 @@ const CITY_PDB={
|
||||||
icn:[37,201,1197],
|
icn:[37,201,1197],
|
||||||
igu:[5,26,124],
|
igu:[5,26,124],
|
||||||
ist:[28,334,1290],
|
ist:[28,334,1290],
|
||||||
|
ivc:[1,2,755], // est.
|
||||||
|
jam:[0,0,2], // est.
|
||||||
jed:[5,25,220],
|
jed:[5,25,220],
|
||||||
jib:[3,19,5],
|
jib:[3,19,5],
|
||||||
jkt:[98,3015,4108],
|
jkt:[98,3015,4108],
|
||||||
jnb:[14,561,879],
|
jnb:[14,561,879],
|
||||||
|
jnu:[1,2,33300], // est.
|
||||||
jpa:[4,18,9693],
|
jpa:[4,18,9693],
|
||||||
kcy:[22,313,33300],
|
kcy:[22,313,33300],
|
||||||
kgl:[5,14,34],
|
kgl:[5,14,34],
|
||||||
khi:[7,15,488],
|
khi:[7,15,488],
|
||||||
|
kin:[2,10,30], // est.
|
||||||
kla:[2,18,71],
|
kla:[2,18,71],
|
||||||
|
krs:[3,15,448], // est.
|
||||||
kul:[20,210,434],
|
kul:[20,210,434],
|
||||||
kyv:[33,506,2342],
|
kyv:[33,506,2342],
|
||||||
lad:[8,27,79],
|
lad:[8,27,79],
|
||||||
|
|
@ -115,6 +140,7 @@ const CITY_PDB={
|
||||||
mao:[7,15,9693],
|
mao:[7,15,9693],
|
||||||
mba:[4,176,274],
|
mba:[4,176,274],
|
||||||
mcp:[2,0,9693],
|
mcp:[2,0,9693],
|
||||||
|
mct:[3,25,45], // Equinix MC1 and WCS; presences est.
|
||||||
mcz:[1,5,9693],
|
mcz:[1,5,9693],
|
||||||
mde:[2,18,598],
|
mde:[2,18,598],
|
||||||
mel:[20,395,3196],
|
mel:[20,395,3196],
|
||||||
|
|
@ -122,54 +148,71 @@ const CITY_PDB={
|
||||||
mgf:[4,9,9693],
|
mgf:[4,9,9693],
|
||||||
mia:[27,553,33300],
|
mia:[27,553,33300],
|
||||||
mil:[29,728,1534],
|
mil:[29,728,1534],
|
||||||
|
mle:[1,3,15], // est.
|
||||||
|
mmk:[2,4,6683], // est.
|
||||||
mnl:[17,352,750],
|
mnl:[17,352,750],
|
||||||
mos:[49,632,6683],
|
mos:[49,632,6683],
|
||||||
mpm:[7,20,36],
|
mpm:[7,20,36],
|
||||||
mrs:[8,273,2249],
|
mrs:[8,273,2249],
|
||||||
|
mru:[3,20,60], // est.
|
||||||
mtl:[35,283,2595],
|
mtl:[35,283,2595],
|
||||||
mty:[5,27,814],
|
mty:[5,27,814],
|
||||||
muc:[22,230,3705],
|
muc:[22,230,3705],
|
||||||
mvd:[1,2,53],
|
mvd:[1,2,53],
|
||||||
|
nas:[1,4,20], // est.
|
||||||
nat:[1,3,9693],
|
nat:[1,3,9693],
|
||||||
nbo:[9,283,274],
|
nbo:[9,283,274],
|
||||||
nou:[2,2,19],
|
nou:[2,2,19],
|
||||||
nyc:[96,1322,33300],
|
nyc:[96,1322,33300],
|
||||||
|
ome:[0,0,33300], // est.
|
||||||
oos:[5,22,443],
|
oos:[5,22,443],
|
||||||
osa:[19,229,1330],
|
osa:[19,229,1330],
|
||||||
osl:[20,209,448],
|
osl:[20,209,448],
|
||||||
ott:[6,21,2595],
|
ott:[6,21,2595],
|
||||||
pan:[8,26,158],
|
pan:[8,26,158],
|
||||||
par:[77,1528,2249],
|
par:[77,1528,2249],
|
||||||
|
pcn:[0,0,0], // est.: no network of its own
|
||||||
|
pdl:[1,3,187], // est.
|
||||||
pek:[10,15,6717],
|
pek:[10,15,6717],
|
||||||
per:[12,248,3196],
|
per:[12,248,3196],
|
||||||
phx:[26,279,33300],
|
phx:[26,279,33300],
|
||||||
|
pkc:[1,2,6683], // est.
|
||||||
pmo:[3,46,1534],
|
pmo:[3,46,1534],
|
||||||
pmw:[3,8,9693],
|
pmw:[3,8,9693],
|
||||||
poa:[22,120,9693],
|
poa:[22,120,9693],
|
||||||
pom:[2,0,46],
|
pom:[2,0,46],
|
||||||
|
pos:[2,10,35], // est.
|
||||||
ppg:[0,0,2],
|
ppg:[0,0,2],
|
||||||
ppt:[0,0,6],
|
ppt:[0,0,6],
|
||||||
prg:[24,336,775],
|
prg:[24,336,775],
|
||||||
|
prr:[0,0,2595], // est.
|
||||||
pvh:[3,4,9693],
|
pvh:[3,4,9693],
|
||||||
|
pvs:[0,0,6683], // est.
|
||||||
qro:[11,144,814],
|
qro:[11,144,814],
|
||||||
|
rai:[1,3,8], // est.
|
||||||
rao:[6,3,9693],
|
rao:[6,3,9693],
|
||||||
rbr:[0,0,9693],
|
rbr:[0,0,9693],
|
||||||
rec:[6,31,9693],
|
rec:[6,31,9693],
|
||||||
rek:[15,51,93],
|
rek:[15,51,93],
|
||||||
ria:[2,2,9693],
|
ria:[2,2,9693],
|
||||||
rio:[33,577,9693],
|
rio:[33,577,9693],
|
||||||
|
rix:[8,60,330], // 8 listed, Perses 2 has 19 networks; presences est.
|
||||||
rom:[12,213,1534],
|
rom:[12,213,1534],
|
||||||
ror:[0,0,4],
|
ror:[0,0,4],
|
||||||
ruh:[8,29,220],
|
ruh:[8,29,220],
|
||||||
|
run:[3,15,15], // est.
|
||||||
sao:[70,1875,9693],
|
sao:[70,1875,9693],
|
||||||
scl:[36,274,450],
|
scl:[36,274,450],
|
||||||
|
sdq:[4,25,90], // est.
|
||||||
sea:[37,539,33300],
|
sea:[37,539,33300],
|
||||||
|
sez:[1,4,20], // est.
|
||||||
sgn:[6,36,1068],
|
sgn:[6,36,1068],
|
||||||
sha:[11,27,6717],
|
sha:[11,27,6717],
|
||||||
sin:[58,1271,782],
|
sin:[58,1271,782],
|
||||||
sjc:[57,1048,33300],
|
sjc:[57,1048,33300],
|
||||||
sjo:[8,6,128],
|
sjo:[8,6,128],
|
||||||
sjp:[2,4,9693],
|
sjp:[2,4,9693],
|
||||||
|
sju:[5,40,60], // est.
|
||||||
slc:[22,202,33300],
|
slc:[22,202,33300],
|
||||||
slz:[1,6,9693],
|
slz:[1,6,9693],
|
||||||
sof:[15,451,889],
|
sof:[15,451,889],
|
||||||
|
|
@ -180,16 +223,21 @@ const CITY_PDB={
|
||||||
svg:[2,14,448],
|
svg:[2,14,448],
|
||||||
syd:[40,979,3196],
|
syd:[40,979,3196],
|
||||||
tbu:[0,0,5],
|
tbu:[0,0,5],
|
||||||
|
tci:[3,30,1341], // est.
|
||||||
the:[2,1,9693],
|
the:[2,1,9693],
|
||||||
|
tik:[0,0,6683], // est.
|
||||||
tll:[7,80,256],
|
tll:[7,80,256],
|
||||||
|
tnr:[1,4,25], // est.
|
||||||
tok:[58,917,1330],
|
tok:[58,917,1330],
|
||||||
tor:[46,509,2595],
|
tor:[46,509,2595],
|
||||||
tpe:[15,274,500],
|
tpe:[15,274,500],
|
||||||
tun:[2,0,30],
|
tun:[2,0,30],
|
||||||
uio:[9,16,287],
|
uio:[9,16,287],
|
||||||
|
uus:[1,3,6683], // est.
|
||||||
van:[13,214,2595],
|
van:[13,214,2595],
|
||||||
vie:[30,377,860],
|
vie:[30,377,860],
|
||||||
vix:[6,30,9693],
|
vix:[6,30,9693],
|
||||||
|
vvo:[5,25,6683], // est.
|
||||||
waw:[25,855,2743],
|
waw:[25,855,2743],
|
||||||
wdh:[1,2,22],
|
wdh:[1,2,22],
|
||||||
zrh:[38,535,1209],
|
zrh:[38,535,1209],
|
||||||
|
|
|
||||||
|
|
@ -1076,7 +1076,12 @@ test('prices follow real connectivity: thin markets cost more, hubs stay put', (
|
||||||
const { ev, errors } = load();
|
const { ev, errors } = load();
|
||||||
start(ev);
|
start(ev);
|
||||||
assert.deepEqual(JSON.parse(ev('JSON.stringify(Object.keys(CITY_PDB).filter(c=>!CITY[c]))')), [], 'every entry is a city on the map');
|
assert.deepEqual(JSON.parse(ev('JSON.stringify(Object.keys(CITY_PDB).filter(c=>!CITY[c]))')), [], 'every entry is a city on the map');
|
||||||
assert.ok(ev('Object.keys(CITY_PDB).length') >= 190, 'real-world data for most cities');
|
assert.deepEqual(JSON.parse(ev('JSON.stringify(CITIES.filter(c=>!CITY_PDB[c.id]).map(c=>c.id))')), [], 'every city has data, so none keeps the plain price by accident');
|
||||||
|
assert.ok(ev('Object.values(CITY_PDB).every(q=>Array.isArray(q)&&q.length===3&&q.every(x=>Number.isInteger(x)&&x>=0)&&q[1]>=0)'), '[facilities, presences, ASNs], whole numbers');
|
||||||
|
// The cities that used to have none: thin markets cost more than Frankfurt, and the Arctic has no neutral data center.
|
||||||
|
for (const c of ['dus', 'rix', 'mct', 'mle', 'fuk', 'sju', 'kin', 'anc', 'tik']) assert.ok(ev(`txComp('${c}')`) > 1, `${c} is no hub`);
|
||||||
|
for (const c of ['brw', 'tik', 'pvs', 'hav']) assert.equal(ev(`colo('${c}')`), 1.5, `${c}: no carrier-neutral data center`);
|
||||||
|
assert.ok(ev("txComp('dus')") < ev("txComp('rix')") && ev("txComp('rix')") < ev("txComp('mle')"), 'Düsseldorf, Riga, Malé: ever thinner');
|
||||||
// A city without data keeps the plain regional price.
|
// A city without data keeps the plain regional price.
|
||||||
assert.equal(ev("(()=>{const q=CITY_PDB.fra;delete CITY_PDB.fra;const r=[txComp('fra'),colo('fra'),popMo('fra')];CITY_PDB.fra=q;return r.join()})()"), `1,1,${ev('POP_MO')}`);
|
assert.equal(ev("(()=>{const q=CITY_PDB.fra;delete CITY_PDB.fra;const r=[txComp('fra'),colo('fra'),popMo('fra')];CITY_PDB.fra=q;return r.join()})()"), `1,1,${ev('POP_MO')}`);
|
||||||
assert.equal(ev("regionMult('syd')"), ev('AU_TRANSIT'), 'Australia keeps its hand-set transit price');
|
assert.equal(ev("regionMult('syd')"), ev('AU_TRANSIT'), 'Australia keeps its hand-set transit price');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue