Blog post

Astro Beyond Static Sites: Server Islands and Hybrid Rendering

Astro's server islands let content sites add dynamic components to otherwise static pages without abandoning CDN caching. What they are, when they make sense, and what an adapter changes.

Astro is best known as a static site generator (SSG) that ships zero JavaScript by default. Starting with version 5.0 (June 2025) and continuing in 6.x, server islands change the calculus: you can stay static-first while adding server-rendered components per page.

How it works. Add server:defer to any .astro component and Astro splits it into its own server-side route. The rest of the page stays fully static on the CDN; only that island fetches dynamic HTML at runtime. This differs from client:load or client:idle — those hydrate JavaScript in the browser, while the server island streams back pure HTML from the server.

What you need. Server islands require an SSR adapter (@astrojs/node, @astrojs/vercel, or @astrojs/cloudflare) — there is no runtime for the deferred render. Props are serialized and encrypted per build via ASTRO_KEY; GET requests respect standard Cache-Control headers.

Use cases. A dynamic GitHub stars counter, a per-visitor language banner, or any widget that needs a runtime fetch but should not block the initial CDN-cached page load.

The trade-off. You still need a server or serverless function. Static pages cache perfectly; island endpoints consume compute per request. For low-traffic personal sites, a small Node instance handles this comfortably.

For goranstimac.com — pure static today — server islands are available but not yet needed. Good to know the option exists when the first dynamic component arrives.

See the official Astro server islands guide for implementation details.

Related What I Do

These What I Do pages are matched from the subject matter of this article, creating a cleaner path from educational content to implementation work.

Continue reading

Based on shared categories first, then the strongest overlap in tags.