Static middleware at the edge
The edge can reuse public files that the Node.js origin marks as cacheable.
Serve versioned public files through Cloud CDN. Leave writes, private API responses and requests that depend on an active session with your Node.js service.
Put Cloud CDN in front of the Node origin. Cache static middleware output and public GET JSON. Bypass authenticated APIs and POST.
The edge can reuse public files that the Node.js origin marks as cacheable.
Identical API GETs can be stored at the edge with a TTL you choose.
Miss storms are consolidated before they hit a small Node cluster.
Pull HTTPS from a reverse proxy in front of Node, or TLS at the origin.
Start with /public, /assets and hashed front-end files.
Only responses that are identical for every anonymous client.
WebSockets, POST, and authenticated JSON stay on Node. See CDN for WebSockets.
Yes. Cloud CDN fronts the HTTP origin, independent of the Node framework.
Cache anonymous HTML. Bypass render output that varies on cookies. See Next.js, Nuxt and Remix pages.
Cloud CDN can reuse origin validators. Prefer explicit TTLs plus purge for HTML.
Cloud CDN supports WebSockets for dynamic paths that bypass cache. See the WebSockets page.