CDN for web applications

Serve application bundles and shared public content from Cloud CDN. Forward signed-in pages and session-specific API responses to the application.

Example cache policy
Public, cacheable resource
/assets/app.8a21.js
Bypass shared cache
/api/session

Set boundaries between shared and private routes

Cache hashed front-end assets and anonymous shells at Cloud CDN. Bypass session HTML, authenticated APIs and WebSockets. Use Origin Shield on HTML misses.

Front-end bundles at the edge

The edge can serve cached JavaScript, CSS and fonts over HTTP/3 to compatible clients.

Session traffic stays on the app

Dashboards and authenticated APIs are not served from cache.

TLS and DDoS on the app hostname

The public name terminates at Cloud CDN with L3-L7 mitigation.

Configuration

Cloud CDN overview
  1. Front the application hostname

    Pull the existing app origin over HTTPS.

  2. Cache hashed assets

    Long TTL for fingerprinted files. Purge the HTML shell on deploy.

  3. Bypass session routes

    Authenticated HTML, APIs and WebSockets go to origin.

  4. Cut over DNS when ready

    Validate on an Aptranet hostname first, including login.

Operational outcomes

  • App assets are global
  • Login and dashboards remain dynamic
  • Deploys purge the HTML shell
  • The app origin is less exposed

Frequently asked questions

Can I cache logged-in HTML?

Only if it is identical for every user, which is rare. Most application HTML should bypass cache.

Does this work with SPAs?

Yes. See CDN for SPAs, React, Angular and Vue.

How should I treat CSRF cookies?

Do not cache HTML that embeds per-user CSRF tokens. Static assets can still be cached.

Can I use BYOIP on the app hostname?

Yes. Cloud CDN supports custom IP and ASN (BYOIP).