What a request goes through between nginx, Next.js, Hono, and PostgreSQL — timings, cache-hit paths, and the full page-load journey from the user's perspective.
From URL input to interactive page — after the DNS split, two distinct paths. Option A shows the fork side-by-side; Option B lays events on a timing swimlane.
Full first load ~200–300ms · Repeat visits serve JS chunks from CDN/nginx instantly · API cache hits < 10ms
A typical read (say, opening /recon/abc) runs end-to-end in under 50ms. With an nginx proxy_cache hit it drops below 10ms. Each hop's latency is plotted below.
Browser
│ GET cuberoot.me/recon/abc
▼
nginx :443 → proxy_pass :3002 (一条线路:systemd Next standalone)
│ ↘ Vercel edge (另一条线路:同份 Next 代码)
▼
Next App Router → SSR shell stream → 客户端 hydrate
│
▼
client → fetch(apiUrl('/v1/recon/abc'))
│
▼
nginx :443 (api.cuberoot.me)
│ proxy_cache /v1/wca/* (24h)
▼
Hono :3001 → pg pool → PostgreSQL :5432
│
▼
JSON → React state → DOMStats data is fully decoupled from the main site. GitHub Actions pulls the WCA public dump weekly, runs 80+ SQL-driven statistics on the runner, produces JSON + TSVs, scp's them to the VM, \copys them into PG, Hono reads them out, and nginx caches 24h on top.
Section 03 sketches the "ideal read" timeline, but real URLs don't all walk the full path. Click the four tabs below to see which stages each pattern lights up — some never boot Next, some hit cache at nginx, some pierce all the way through.
LandingPage is build-time static (SSG) HTML served straight from CDN / nginx — no Next function runs; the client hydrates and then fetches dynamic data (upcoming comps / records) client-side.