China Telecomet's premium crossing in Moscow, at the Hong Kong price (#195)
This commit is contained in:
parent
7cfadaa6ae
commit
f5e15e427f
16 changed files with 103 additions and 11 deletions
|
|
@ -5,7 +5,14 @@
|
|||
Not That Telecom and Level Tree (whose real-world network lists no sites in PeeringDB at all, but sells in Sydney). Others can sit in
|
||||
an Australian city, like the Pacific carriers backhauling to Sydney (or Glowball Sakura Lager), but reach Australian
|
||||
customers only from overseas. */
|
||||
const AU_SELLERS=['tsy','voc','spl','sgt','drz','cog','ntt','lvl'],sellsAt=(n,c)=>!!n.price&&n.pops.includes(c)&&(!CITY[c].au||AU_SELLERS.includes(n.id));
|
||||
const AU_SELLERS=['tsy','voc','spl','sgt','drz','cog','ntt','lvl'],sellsAt=(n,c)=>!!n.price&&(n.pops.includes(c)||!!n.premOnly&&n.premOnly.includes(c))&&(!CITY[c].au||AU_SELLERS.includes(n.id));
|
||||
/* China Telecomet's premium crossing into China (CN-Too) is sold where its border routes start: Hong Kong, and Moscow
|
||||
(#195), where it rides the land route east and nothing else of theirs is on offer (premOnly). It costs the same
|
||||
wherever you buy it: the Hong Kong price. */
|
||||
const premCity=(n,c)=>!!n.premium&&!!n.premAt&&n.premAt.includes(c),premOnlyAt=(n,c)=>!!n.premOnly&&n.premOnly.includes(c);
|
||||
const premOn=t=>!!t.premium&&!!NET[t.net]&&premCity(NET[t.net],t.city);
|
||||
// What a port costs per Gbps and month before the commit: the premium crossing at Hong Kong prices, anything else at the city's.
|
||||
const transitPerG=(n,c,prem)=>prem&&premCity(n,c)?n.price*n.premium*netMult(n,'hkg'):n.price*netMult(n,c);
|
||||
const onIx=(n,c)=>CITY[c].au&&n.auIx?n.auIx.includes(c):n.ix==='ALL'||Array.isArray(n.ix)&&n.ix.includes(c);
|
||||
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=>onIx(n,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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue