Selective peers will not meet you where a satellite is your only way out (#83)
An island or remote town that only satellite circuits join to the rest of your network (satOnly: no built wave, fiber, cable or pie dish there, its fastest circuit otherwise) is a place many selective networks will not peer: they would hand you traffic for your whole network to haul through orbit. Like remote peering, the verdict is stable per network (a hash): 60 in 100 selective networks refuse a GEO hop, 15 in 100 a MEO one, and every network that minds MEO minds GEO too. It is judged on what is built, never on today's cuts, so the single-spur trap does not also pause your peering mid-outage. peerOk refuses new IX sessions and PNIs there with one line naming the orbit and the circuit's round trip; ixSessions leaves an existing session out while the island is satellite-only, without deleting it from S.peers, so it carries again once a wave or cable is lit. Existing PNIs stay. No new state, nothing for saves.
This commit is contained in:
parent
ae78e82ddb
commit
1f76639b8f
12 changed files with 77 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ function ixCap(c){return ixLagF(c)*(S.myIx[c]?myFab(c).g*(myIxLive(c)?1:0):liveC
|
|||
function ixSessions(c){
|
||||
const s=new Set(); if(S.ixp[c]===undefined)return s;
|
||||
for(const id of ixMembers(c)){const n=NET[id];
|
||||
if(S.peers[id+'@'+c]&&!snub(id,c)&&!(isRemote(c)&&noRemote(id)))s.add(id);
|
||||
if(S.peers[id+'@'+c]&&!snub(id,c)&&!(isRemote(c)&&noRemote(id))&&!satNo(id,ixCity(c)))s.add(id);
|
||||
else if(S.rs[c]&&n.pol==='open'&&ppol()==='open')s.add(id);
|
||||
else if(S.myIx[c]&&(n.pol==='open'||n.pol==='selective'))s.add(id);}
|
||||
return s;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,14 @@ const REMOTE_WARN=`<p class="note" style="color:var(--tx-red,var(--bad))">${tr('
|
|||
const REMOTE_WHY=[tr('peering_policy.policy_no_remote_peers_be_in'),tr('peering_policy.saw_your_session_come_in_over'),tr('peering_policy.only_peers_with_members_they_can'),tr('peering_policy.their_pearingdb_entry_says_remote'),tr('peering_policy.tried_a_remote_peer_once_it')];
|
||||
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);}
|
||||
/* Satellite islands (#83): where a satellite circuit is your only way out of a city, many selective networks will not
|
||||
peer there. They would hand you traffic for your whole network to haul through orbit: most refuse a GEO hop (about
|
||||
600 ms there and back), few a MEO one (about 130 ms). A stable verdict per network, like remote peering. */
|
||||
const SAT_NO={geo:60,meo:15};
|
||||
const noSat=(id,orb)=>{const n=NET[id];return !!n&&n.pol==='selective'&&own(SAT_NO,orb)&&hstr(id+'|sat')%100<SAT_NO[orb];};
|
||||
// The circuit network id will not take your traffic over in city c (null when it will, or no satellite is in the way).
|
||||
function satNo(id,c){const n=NET[id];if(!n||n.pol!=='selective'||hstr(id+'|sat')%100>=SAT_NO.geo)return null;const l=satOnly(c);return l&&noSat(id,SATS[l.bird].orb)?l:null;}
|
||||
function satPeerWhy(id,c){const l=satNo(id,c);return l?tr('peering_policy.not_while_a_satellite_is_your_only_way',{city:CITY[c].name,orb:SAT_ORB[SATS[l.bird].orb].n,ms:Math.round(2*satLat(l))}):'';}
|
||||
/* 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};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ function peerOk(id,via,city){
|
|||
const sn=snub(id,city);if(sn&&(via==='ix'||sn.all))return {ok:false,snub:true,why:snubWhy(sn)};
|
||||
if(msfNope(id,city))return {ok:false,why:tr(MSF_NOPE[hstr(ixCity(city)+S.day)%MSF_NOPE.length])};
|
||||
if(via==='ix'&&city&&isRemote(city)&&noRemote(id))return {ok:false,remote:true,why:REMOTE_WHY[hstr(id)%REMOTE_WHY.length]};
|
||||
if(city&&(via==='ix'||via==='pni')){const w=satPeerWhy(id,ixCity(city));if(w)return {ok:false,sat:true,why:w};}
|
||||
if(n.pol==='open')return {ok:true};
|
||||
// In the Cogentle Spat, Goggle's peering desk wants eight times the usual traffic first, so cheap Cogentle-only transit really costs you Goggle (playtest).
|
||||
if(n.pol==='selective'){const need=Math.round((via==='pni'?n.minPni:n.minIx)*confBoost(id)*salesPeerMul()*(id==='ggl'&&scnRule('spat')?8:1));return dem>=need?{ok:true}:{ok:false,why:tr('sold_out.wants_need_gbps_of_traffic_from',{need,dem:dem.toFixed(1)})};}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue