Build-time pre-render vs server rendering vs CDN cache — what the difference is and why it matters for performance.
In the early years of the web, every page was generated on request. PHP queried the database, filled the template — on every request, for every user. This model is flexible but slow, complex, and exposed to attacks.
CDN caching partially solved this. The server renders once, the CDN distributes copies to 300+ locations. The first request is slow, subsequent ones are fast. But cache staleness is a risk — when content changes, you either flush the entire cache or users see outdated content.
Astro asks a different question: when page content is known at deploy time rather than request time, why render it on every request?
Astro generates all pages as static HTML at build time. No variables, no queries, no server. What's deployed is already finished HTML. The CDN returns this HTML directly — there's never a 'cache miss' because there's no server to miss.
Page definitions from pages.config.ts, organism components, and JSON content files — all read at build time and compiled into static HTML. Cloudflare Pages distributes this HTML to 300+ locations. When a user requests a page, no server runs — Cloudflare returns directly from cache.
The CMS is a separate system entirely. It runs on Cloudflare Workers, writes content to GitHub. Every save is a commit, a new build is triggered, and the site updates within 60 seconds.
Build-time pre-render is the best possible performance model for static content. Choosing Astro SSG means delivering the fastest experience to your users while reducing the attack surface to near zero.
How Multi-Tenant CMS Works | AstroForge Blog
2025-04-18Git-Backed Content Management | AstroForge Blog
2025-03-25The Organism System: From Component to Page | AstroForge Blog
2025-02-14Choosing a Template Engine for Your Agency | AstroForge Blog
2025-01-30Schema Pipeline: TypeScript to CMS Form | AstroForge Blog
2024-12-20