diff --git a/CHANGELOG.md b/CHANGELOG.md index 207c53d..fe05b5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ All notable changes to this project are documented here. The project follows They get red badges on the map (T, P, C, R), the IX hexagon blinks red when its port is full, and the NOC lists everything running hot with a hint on what to do (#6). +- Some routers take forever to boot. The Infra tab shows each chassis's boot + time and its forwarding chip, including the Junipurr PacketOinker™ in the + Chonk 800 and two of them in the Absolute Unit. On a slow booter, crashes + last a few days longer, a rush repair still needs a day of booting, and + swapping the only router takes three days. Bigger chassis are slow more + often. A second router hides all of it. ## [1.4.0] — 2026-10-23 diff --git a/site/index.html b/site/index.html index cba7737..e5b2076 100644 --- a/site/index.html +++ b/site/index.html @@ -400,11 +400,16 @@ const MYIX_COST=80000, MYIX_MO=3000, MYIX_FEE=1500, START_CASH=200000; const LT=[{n:'10G',g:10,m:1},{n:'100G',g:100,m:2.8},{n:'400G',g:400,m:6},{n:'1.6T',g:1600,m:13},{n:'6.4T',g:6400,m:28}]; const PORT=[{n:'10G',g:10,setup:500,tmo:150,ix:400,pni:200},{n:'100G',g:100,setup:1500,tmo:400,ix:1500,pni:350},{n:'400G',g:400,setup:4000,tmo:900,ix:4000,pni:600},{n:'800G',g:800,setup:8000,tmo:1600,ix:7000,pni:1000}]; const RG=[ - {n:'Rusty Router 9000',pn:'100G',cap:400,cost:0,mo:0,maxLT:1,maxP:1,lvl:1,blurb:'Bought used on eBuy. The fans sound like a jet engine.'}, - {n:'Edge Lord 400',pn:'400G',cap:3200,cost:30000,mo:1000,maxLT:2,maxP:2,lvl:2,blurb:'Sharp, edgy, and finally speaks 400G and 400ZR+.'}, - {n:'Chonk 800',pn:'800G',cap:12800,cost:90000,mo:3000,maxLT:4,maxP:3,lvl:3,blurb:'An absolute unit with 800G ports. Takes 800ZR+ optics.'}, - {n:'Absolute Unit 1.6T',pn:'1.6T',cap:51200,cost:250000,mo:8000,maxLT:4,maxP:3,lvl:4,blurb:'1.6T ports and its own weather system. Needs a forklift.'}, + {n:'Rusty Router 9000',pn:'100G',cap:400,cost:0,mo:0,maxLT:1,maxP:1,lvl:1,boot:6,slowP:10,chip:'a mystery ASIC',blurb:'Bought used on eBuy. The fans sound like a jet engine.'}, + {n:'Edge Lord 400',pn:'400G',cap:3200,cost:30000,mo:1000,maxLT:2,maxP:2,lvl:2,boot:11,slowP:20,chip:'merchant silicon',blurb:'Sharp, edgy, and finally speaks 400G and 400ZR+.'}, + {n:'Chonk 800',pn:'800G',cap:12800,cost:90000,mo:3000,maxLT:4,maxP:3,lvl:3,boot:25,slowP:45,chip:'Junipurr PacketOinker™',blurb:'An absolute unit with 800G ports, built around the Junipurr PacketOinker™ forwarding chip. Oinks at line rate. Takes 800ZR+ optics.'}, + {n:'Absolute Unit 1.6T',pn:'1.6T',cap:51200,cost:250000,mo:8000,maxLT:4,maxP:3,lvl:4,boot:40,slowP:60,chip:'PacketOinker² (two pigs, one chassis)',blurb:'1.6T ports, its own weather system and two PacketOinker² chips per line card. Needs a forklift.'}, ]; +/* Some routers take forever to boot. Each POP's chassis has a personality per model: most come + back in minutes, a few sit through every line card self-test known to the vendor. */ +const SLOW_BOOT=['is oinking through the self-test of every PacketOinker on every line card','is running fsck on a compact flash card older than your interns','found a newer firmware on the USB stick someone left in it, and is installing it','is counting to 2 million routes. Out loud. One at a time','is waiting for the line cards to agree on who is the primary','booted, panicked about a missing fan tray, and started again','is "synchronising the routing engines". Nobody knows what that means']; +function slowBoot(c){const p=S.pops[c];if(!p)return false;const g=p.rgen||0;return hstr(c+'|boot|'+g+'|'+S.asn)%100Math.round(ROUTER_COST+RG[g].cost*0.8); // dark fiber & optical gear const DF_SYS={ @@ -1136,12 +1141,12 @@ function fireFailure(){ const msg=l.sub?pick([`A curious shark bit your subsea cable ${A}–${B}.`,`A ship dragged its anchor across your ${A}–${B} cable.`,`An undersea landslide snapped ${A}–${B}.`]):pick([`A backhoe found your fiber between ${A} and ${B}.`,`Squirrels chewed through ${A}–${B}. They regret nothing.`,`Road works cut ${A}–${B}. Nobody called before digging.`]); addInc({type,ref:tr,until:S.day+dur,msg:msg+(hit.length>1?` All ${hit.length} links in that trench went down with it.`:''),cost:Math.max(4000,Math.round(hit.reduce((a,x)=>a+x.mo,0)*0.5))}); }else if(type==='crash'||type==='power'){ - const c=pick(Object.keys(S.pops)),pp=S.pops[c],dur=(type==='crash'?2+Math.floor(Math.random()*2):3+Math.floor(Math.random()*3))*(type==='crash'&&S.ev.sanction>S.day?2:1); - if(type==='crash'&&(pp.routers||1)>=2){pp.rdown=S.day+dur;S.stats.incidents++;S.stats.survived++;toast(`Router crash in ${CITY[c].name}
One router panicked and its twin took over. Capacity there is down one router for ${dur} days.`,'good');sfx('alert');return;} + const c=pick(Object.keys(S.pops)),pp=S.pops[c],slow=slowBoot(c),dur=(type==='crash'?2+Math.floor(Math.random()*2):3+Math.floor(Math.random()*3))*(type==='crash'&&S.ev.sanction>S.day?2:1)+(slow?2+Math.floor(Math.random()*3):0); + if(type==='crash'&&(pp.routers||1)>=2){pp.rdown=S.day+dur;S.stats.incidents++;S.stats.survived++;toast(`Router crash in ${CITY[c].name}
One router panicked and its twin took over.${slow?` The crashed one ${esc(pick(SLOW_BOOT))}.`:''} Capacity there is down one router for ${dur} days.`,'good');sfx('alert');return;} if(type==='power'&&pp.gen){S.stats.incidents++;S.stats.survived++;toast(`Power cut in ${CITY[c].name}
Your backup generator kicked in. Lights stayed on.`,'good');sfx('alert');return;} pp.down=Math.max(pp.down||0,S.day+dur); - const msg=type==='crash'?pick([`Your router in ${CITY[c].name} crashed. Kernel panic, packet panic.`,`A firmware update bricked your router in ${CITY[c].name}.`]):`Power outage at ${CITY[c].dc} in ${CITY[c].name}. The generator did not start.`; - addInc({type,ref:c,until:S.pops[c].down,msg,cost:type==='crash'?2500:7000,fix:type==='crash'?'Turn it off and on again':'Rent a generator'}); + const msg=type==='crash'?(slow?`Your router in ${CITY[c].name} crashed and is rebooting. It ${pick(SLOW_BOOT)}. Boot time on this one: about ${bootMin(c)} minutes per attempt, and it is on attempt ${2+Math.floor(Math.random()*5)}.`:pick([`Your router in ${CITY[c].name} crashed. Kernel panic, packet panic.`,`A firmware update bricked your router in ${CITY[c].name}.`])):`Power outage at ${CITY[c].dc} in ${CITY[c].name}. The generator did not start.`; + addInc({type,ref:c,until:S.pops[c].down,msg,slow:type==='crash'&&slow,cost:type==='crash'?2500:7000,fix:type==='crash'?(slow?'Turn it off and on again (it will take a while)':'Turn it off and on again'):'Rent a generator'}); }else if(type==='transit'){ const t=pick(S.transit.filter(t=>!(t.down>S.day)));t.down=S.day+3+Math.floor(Math.random()*3); addInc({type,ref:t.id,until:t.down,msg:`${NET[t.net].name} is having an outage in ${CITY[t.city].name}. Your transit port there is dark.`,cost:0}); @@ -1373,7 +1378,8 @@ const ACT={ dropBiz:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.biz=S.biz.filter(b=>b.id!==id);UI.confirm=null;after();}, upLink:({id,tier})=>{tier=+tier;const l=S.links.find(x=>x.id===id);if(!l||l.kind!=='wave'||!LT[tier]||tier<=l.tier)return;if(!waveOk(l.a,l.b,tier)){toast(`A ${LT[tier].n} wave needs ${esc(waveNeed(tier))} routers at both ends.`,'bad');sfx('err');return;}const nm=Math.round(waveMo(l.km,l.sub,tier)*(l.mult||1));if(!spend(nm))return;l.mo=nm;l.tier=tier;after();}, rmLink:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.links=S.links.filter(l=>l.id!==id);UI.sel=null;UI.confirm=null;after();}, - fixInc:({id})=>{const i=S.inc.find(x=>x.id===id);if(!i)return;if(!spend(i.cost))return;clearInc(i);toast(`Fixed. ${incTitle(i.type)} resolved early.`,'good');after();}, + fixInc:({id})=>{const i=S.inc.find(x=>x.id===id);if(!i)return;if(i.slow&&i.rushed)return;if(!spend(i.cost))return; + if(i.slow&&i.until>S.day+1){i.rushed=true;i.cost=0;i.until=S.day+1;const p=S.pops[i.ref];if(p)p.down=Math.min(p.down,S.day+1);toast(`Power-cycled.
The router in ${esc(CITY[i.ref].name)} is booting again. It will be up tomorrow, the ${esc(RG[(p&&p.rgen)||0].chip)} willing.`,'good');after();return;}clearInc(i);toast(`Fixed. ${incTitle(i.type)} resolved early.`,'good');after();}, foundIx:({city})=>{if(!S.pops[city]||S.myIx[city]||CITY[city].ix||CITY[city].cn)return;if(!spend(MYIX_COST))return;const nm=(S.name.split(' ')[0]||'My').replace(/[^A-Za-z0-9]/g,'').slice(0,10)+'-IX '+CITY[city].name; S.myIx[city]={name:nm,members:[],next:S.day+4};S.ixp[city]=2;toast(`You founded ${esc(nm)}!
Networks will join over time and pay you for ports. Open members peer with you for free.`,'goal');after();}, buildLink:({tier})=>{tier=+tier;const p=UI.pending;if(!p)return;const {a,b}=p;const km=kmBetween(a,b),sub=isSub(a,b),sib=pairLinks(a,b).filter(l=>l.kind!=='vxc'),same=sib.length>0&&UI.route==='same',border=cnCity(a)!==cnCity(b),mult=(sib.length&&!same?DIVERSE:1)*(border?3*(UI.cnPrem&&(a==='hkg'||b==='hkg')?1.6:1):1); @@ -1408,7 +1414,7 @@ const ACT={ rmRouter:({city})=>{const p=S.pops[city];if(!p||(p.routers||1)<=1)return;p.routers--;after();}, upRouter:({city})=>{const p=S.pops[city];if(!p)return;const g=(p.rgen||0)+1;if(!RG[g])return;if(RG[g].lvl>lvl()){toast(`${esc(RG[g].n)} unlocks at customer level ${RG[g].lvl}.`,'bad');sfx('err');return;} const rt=p.routers||1;if(!spend(RG[g].cost*rt))return;p.rgen=g; - if(rt===1){p.down=Math.max(p.down||0,S.day+1);addInc({type:'maint',ref:city,until:S.day+1,msg:`Swapping the only router in ${CITY[city].name} for a ${RG[g].n}. Maintenance window: back tomorrow.`,cost:0});toast(`Maintenance window in ${CITY[city].name}
One router means downtime during the swap. Back tomorrow.`,'bad');} + if(rt===1){const sl=slowBoot(city),dd=sl?3:1;p.down=Math.max(p.down||0,S.day+dd);addInc({type:'maint',ref:city,until:S.day+dd,msg:sl?`Swapping the only router in ${CITY[city].name} for a ${RG[g].n}. The new one ${pick(SLOW_BOOT)}. Back in ${dd} days.`:`Swapping the only router in ${CITY[city].name} for a ${RG[g].n}. Maintenance window: back tomorrow.`,cost:0});toast(`Maintenance window in ${CITY[city].name}
${sl?`One router, and this one takes forever to boot. Back in ${dd} days.`:'One router means downtime during the swap. Back tomorrow.'}`,'bad');} else toast(`Rolling upgrade in ${CITY[city].name}
${rt} × ${esc(RG[g].n)}, swapped one at a time. Zero downtime.`,'good'); floater(CITY[city].x,CITY[city].y-30,RG[g].n+'!','#FF4F9A');after();}, dfMode:({m})=>{UI.lmode=m;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, @@ -1625,6 +1631,7 @@ function cityPanel(c){ const rt=p.routers||1,g=p.rgen||0,G=RG[g],nl=R.nodeLoad[c]||0,nc=R.nodeCap[c]||nodeCap(c),N=RG[g+1]; h+=`

Routers

The model sets your fastest interface and how much this POP can forward. More routers add capacity and survive crashes.

${rt} × ${esc(G.n)}
Up to ${G.pn} interfaces · ${fmtG(G.cap)} per router · ${esc(G.blurb)}
+
Forwarding chip${esc(G.chip)}
Boot time${slowBoot(c)?`~${bootMin(c)} min · a slow one`:`~${bootMin(c)} min`}
${slowBoot(c)?`

This chassis takes forever to boot: crashes last longer, and swapping the only router here takes 3 days. A second router hides it.

`:''}
Forwarding load${fmtG(nl)} / ${fmtG(nc)}
${nl>=nc*0.95?`

Maxed out. Traffic here is being dropped.

`:''}
${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'):''}
@@ -1859,7 +1866,7 @@ function showHelp(){
Embedded cache
A CDN's server in your rack. Serves most of that CDN's traffic locally, for the price of power.
DE-KICKS
The group behind several big exchanges (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) treats price lists as a state secret. Ports are quoted per customer and go up the bigger you look. Haggling can work, backfire or stall for a week. Prices get "harmonised" upwards once a year, add-ons appear on your invoice until you opt out, and trying to leave earns you a retention discount that ends with a fee.
Remote peering
Reach an IX over a fabric circuit without a POP there. It works, and the route server still gets you every open network, but it is discouraged: the reseller charges 1.5× for the port and oversubscribes it to 80%, latency rides the fabric, one fabric outage drops every session, and many selective networks refuse remote members outright.
Peering policy
Open peers with anyone. Selective wants to see traffic first. Restrictive (Tier 1s) only peers with giants, over PNIs. Paid means exactly that. Big selective networks also have moods: in some cities they refuse new peers for a few months, or only take PNIs, and now and then they tear down a session you already had. Try another city or a PNI, and ask again later.
Waves
Your fiber links are leased waves at a flat monthly rate. Longer and bigger costs more (10G → 6.4T), and subsea is 1.8× the price.
95th percentile
Transit bills sample your usage every day and charge the 95th percentile of the last 30 days, so short spikes are forgiven but long ones are not.
Routers
Each POP's router model caps its fastest port (100G, 400G, 800G, 1.6T) and how much it can forward. Bigger waves and ports need better routers at both ends. Better models unlock with your customer level. With one router, upgrades mean a day of downtime.
Dark fiber
Lease an IRU or build your own (slow, with delays), then buy a line system with amplifiers and light channels with 400ZR+, 800ZR+ or 1.6T transponders. Much cheaper than waves at scale, but the gear can fail. A spares kit speeds up repairs.
Subsea cables
Subsea waves can only follow real-ish cable systems, drawn faintly on the map (tap a city to highlight its cables). Teal ones are new and cheap, purple ones pricey, dashed ones old and cut-prone. All your waves on one cable die together when it is cut. Between continents on land, you can often choose overland (2.5×, many borders) or a cable.
Latency
Every link has latency. High-frequency traders pay a fortune for a circuit within their latency budget; route them “Lowest latency”. Bulk backup customers do not care, so route them “Scenic” over your quiet links to keep busy ones free.
NOC dashboard
The chart button at the top opens traffic graphs by exit (caches, PNIs, IX, transit), money over time, per-ASN traffic with how it reaches you and what its transit costs, plus your busiest links and routers.
Asia
A weird, underserved market. Transit costs 2.5× what it does in Europe (Africa 2×, Oceania 1.8×), local incumbents mostly peer only for pay, and IXs are fragmented. But demand is enormous and users sign up 60% faster than anywhere else. Peering and caches pay off most here.
Russia
Moscow needs a mandatory government box in every POP, Western CDNs are mostly gone, Goggle video is throttled to half speed, and the sovereign internet drills now and then cut Moscow off for a day.
Events, chains and wholesale
Event networks (a final, a festival, a keynote) need a burst of capacity in one city for a few days and pay once at the end, prorated by how much of the crowd you served; below 70% you pay a penalty. SD-WAN chains connect 3–6 of your POPs hub-and-spoke, so one broken spoke upsets the whole contract. Once you run your own dark fiber, carriers want to rent spare channels as alien waves, and on fiber you built yourself, a spare pair.
Bank
Tap your cash to open the bank. Lenders make offers now and then, and much more often when you are in the red. Each loan has a monthly payment and some odd conditions; break one and you pay a penalty. Your credit rating decides which banks talk to you. The loan shark is always there. Do not be late.
LAGs
Out of port speed? Bundle up to 8 identical ports to the same transit provider, IX or PNI into a LAG. Each member costs a full port; flow hashing is never perfectly even, so a bundle carries about 95% of the sum.
Traffic engineering
Tap a link to see which networks, which entry points and which customer cities fill it. Raise a link's metric to steer traffic around it, or set an egress (transit, IX, PNI) to Prefer or Backup only.
China
Mainland China needs a license and a local joint venture. Many foreign services are blocked there, and traffic crossing the border loses packets unless you pay for premium routes.
Weird requirements
Some customers come with conditions: no Cogentle anywhere, no subsea cables because of sharks, two routers, a generator, NetChill on-net, low-loss China reach and more. Each pays a bonus. Unmet ones make them grumpy until you fix it or they leave.
Customer levels
As your peak traffic and footprint grow, bigger customers show up: streaming startups and universities, then AI GPU data centers and cloud on-ramps, then AI training interconnects and hyperscaler DCI deals measured in terabits. Pink $$ bubbles mark the big ones.
L2VPN & DDoS protection
Businesses may want a private circuit between two of your POPs (it rides your backbone), or DDoS protection (needs your own scrubbing center).
NNI fabrics
Megapork, PocketFabric and Consolation Connect sell a port plus virtual circuits between cities. Great for small links and remote peering at an IX where you have no POP.
-
Failures
Things break all the time: fiber cuts, router crashes, power cuts, IX loops, fabric outages, route leaks, DDoS, fat fingers, cooling failures, and geopolitics: sanctions, tariffs, BGP hijacks, landing permit disputes, exam-day shutdowns and Red Sea cable cuts. Traffic reroutes automatically over other paths and upstreams. Parallel links on diverse routes, a second router and a backup generator all help. Or pay to rush repairs.
+
Boot times
Some routers take forever to boot. The Infra tab shows how long yours takes. Slow booters make crashes last longer and turn a one-router swap into a three-day outage. Bigger chassis, especially anything with a PacketOinker™ inside, are slow more often. Twin routers make it someone else’s problem.
Failures
Things break all the time: fiber cuts, router crashes, power cuts, IX loops, fabric outages, route leaks, DDoS, fat fingers, cooling failures, and geopolitics: sanctions, tariffs, BGP hijacks, landing permit disputes, exam-day shutdowns and Red Sea cable cuts. Traffic reroutes automatically over other paths and upstreams. Parallel links on diverse routes, a second router and a backup generator all help. Or pay to rush repairs.
${btn(UI.started?'Back to the map':'Got it','helpClose',{},'big')}${RELEASE_NOTES.length?btn(`What’s new in ${esc(APP_VERSION)}`,'whatsNewShow',{},'ghost'):''}${UI.started&&S&&!S.lost?btn('Start a new network','resetAsk',{},'ghost sm'):''}
${UI.started&&S&&!S.lost?btn('Export save','exportSave',{},'ghost sm'):''}${btn('Import a save','importPick',{},'ghost sm')}
`); } function showWin(){openModal(`

You're a Tier 1!

${esc(S.name)} (AS${S.asn}) is transit-free. You peer with every giant on the planet and pay nobody to reach the internet. Took you ${S.day} days and ${S.stats.incidents} incidents.

${btn('Keep building','keepPlaying',{},'pink big')}`);sfx('coin');} diff --git a/tests/issues.test.js b/tests/issues.test.js index 19d2017..f486627 100644 --- a/tests/issues.test.js +++ b/tests/issues.test.js @@ -65,3 +65,23 @@ test('#6 full transit, IX, caches and routers show up in the NOC and on the map' ev("draw&&draw(performance.now())"); assert.deepEqual(errors, []); }); + +test('some routers take forever to boot, PacketOinkers most of all', () => { + const { ev, errors } = load(); + base(ev); + const pct = JSON.parse(ev("JSON.stringify(RG.map((G,g)=>{let n=0;for(const c of ALLC){S.pops[c]=S.pops[c]||{rgen:g,routers:1};S.pops[c].rgen=g;if(slowBoot(c))n++;}return n/ALLC.length;}))")); + assert.ok(pct[0] < pct[2] && pct[2] > 0.2 && pct[0] < 0.3, `bigger chassis are slow more often (${pct})`); + assert.match(ev("RG[2].chip"), /PacketOinker/); + // find a slow and a fast POP and crash them + ev("for(const c of ALLC)if(c!=='fra')delete S.pops[c];S.pops.fra.rgen=2;S.pops.fra.routers=1"); + const slowCity = ev("ALLC.find(c=>{S.pops[c]={rgen:2,routers:1,down:0};const s=slowBoot(c);if(!s)delete S.pops[c];return s;})"); + ev(`for(const c of Object.keys(S.pops))if(c!=='${slowCity}')delete S.pops[c];S.transit=[];S.ixp={};for(let i=0;i<800&&!S.inc.some(x=>x.type==='crash');i++){fireFailure();S.inc=S.inc.filter(x=>x.type==='crash');}`); + const inc = JSON.parse(ev("JSON.stringify(S.inc.find(i=>i.type==='crash'))")); + assert.ok(inc.slow, 'crash on a slow booter is flagged'); + assert.ok(inc.until - ev('S.day') >= 4, 'and lasts longer'); + ev(`S.cash=1e6;ACT.fixInc({id:'${inc.id}'})`); + assert.equal(ev(`S.inc.find(i=>i.id==='${inc.id}').until`), ev('S.day+1'), 'rushing it still takes a day'); + ev(`selectCity('${slowCity}');ACT.tab({t:'infra'})`); + assert.match(ev("document.getElementById('panelBody').textContent"), /a slow one/); + assert.deepEqual(errors, []); +});