Build-time pre-rendering (SSG) for maximum speed and SEO
When catalog pricing, service listings, or blog articles change once a day or week, running a fast Astro static rebuild yields instant <50ms edge TTFB and zero database reads per visitor.
Request-time edge endpoints for interactive visitor actions
Anything personalized per request—saving form inputs into D1, sending transactional confirmation via Resend, or verifying gated receipts—runs dynamically in lightweight Pages Functions.
Hybrid pattern: static HTML shell + selective fetch()
Serve static SEO-rich product or template pages directly, then let minimal browser JS fetch /api/availability or submit forms dynamically only when visitors interact.
Common questions
If I stay on Astro output: 'static', can /functions/api/ routes still run dynamically?
Yes! On Cloudflare Pages, files inside your root functions/ directory deploy as dynamic Workers automatically even when Astro builds 100% static HTML into dist/.
How fast do Cloudflare Deploy Hooks rebuild static content after data changes?
Typical small-to-medium Astro static builds finish and propagate globally within 30 to 90 seconds.
References
Provider interfaces and limits can change. Consult the original documentation before changing production settings.