October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Astro Runtime Islands: Choosing Between Server Islands and On-Demand Pages

Astro can combine a prerendered page with deferred, database-backed server islands—or render a whole route on demand. Here’s how to choose and what to plan for.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a page’s content changes in a database between builds, a purely prerendered page can show stale data until the next build. Astro can keep a mostly static page shell while rendering a database-backed component on demand, or render the whole selected route on demand. Astro calls its deferred component feature server:defer server islands; “runtime islands” is not the official feature name.

The right boundary depends on what needs fresh data: make the route on-demand when its response is largely request-specific, and defer an island when only a distinct region needs runtime data. The official documentation explains these mechanisms, but does not establish any particular author’s database, host, implementation, or measured results.

As an Amazon Associate I earn from qualifying purchases.

Can a prerendered Astro page include server-rendered content?

Yes. Astro can send a prerendered page and its fallback content first, then request a deferred server island and insert the resulting HTML. The page does not have to choose between being entirely static and entirely server-rendered.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Astro’s server-islands guide describes this sequence: the page and fallback render, then the browser requests the island endpoint and replaces the fallback with the component’s rendered output. That is useful when most of a page is stable but a specific area needs current database content or request-specific logic. Astro’s server islands guide documents the feature.

Astro’s islands architecture documentation quotes Preact creator Jason Miller describing the broader pattern as server-rendered HTML with placeholders around dynamic regions that can be hydrated into small widgets. That general description is not specifically a description of Astro’s server:defer implementation. Astro’s islands architecture guide provides the broader context.

What “runtime islands” means in Astro

Astro’s documented mechanism for a server-rendered component deferred from the main response is a server island, enabled with the server:defer directive. The term “runtime islands” could also describe a custom pattern, but the available project details do not identify a custom implementation, database, hosting provider, or code. It would be misleading to present one as an account of a specific build.

For an actual implementation, describe precisely where database access occurs, what crosses the component boundary, and what the visitor sees while the request is pending or if it fails. Server-island terminology alone does not specify those project choices.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose route-level rendering or a server island

Astro prerenders pages by default. With a server adapter configured, a route can opt out of prerendering using export const prerender = false and be rendered on demand. For background on the static-by-default model and deployment options, see Astro’s on-demand rendering guide.

Decision Route-level on-demand rendering Component-level server island
What is dynamic The selected route or endpoint is rendered when requested. One component is rendered separately; the rest of the page can arrive first.
Best fit The route response broadly depends on current database data or request-specific logic. The page is mostly stable, with one or more regions that need runtime data.
Astro mechanism Configure a server adapter and set prerender = false for the route. Configure a server adapter and mark the component server:defer; add fallback content when useful.
Operational consideration The route’s request path and cache policy govern the dynamic response. Each island adds a separate request; props, caching, and deployment key consistency matter.

The practical difference follows from what Astro renders on demand and what it defers; neither approach has a universal performance advantage. Database latency, request count, cache policy, and failure behavior determine how either design performs in a particular workload.

What a server-island implementation needs

An adapter and a suitable deployment target

Server islands require a server adapter. Astro’s current on-demand rendering guide lists official adapters for Node.js, Netlify, Vercel, and Cloudflare; choose according to the actual deployment environment rather than assuming a host from the feature name. The Astro Adapter API guide explains the adapter layer.

Serializable, limited props

Props passed to a server island must be serializable. Functions and circular references cannot be passed. Pass only the data the component needs, rather than attempting to send an entire application object or database connection across the boundary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Astro notes that sufficiently long query data can cause an island request to use POST rather than GET. POST requests are not browser-cached, so large props can change caching behavior. Consider whether an identifier or small set of parameters can be passed and the island can retrieve the rest of the data on the server. See the server-island props and request details.

Request context and URLs

A server island runs in its own context. Inside it, Astro.url refers to the special island endpoint URL, not necessarily the URL of the original page. If the island needs page-specific context, pass it explicitly as a serializable prop or use Astro’s documented Referer approach carefully.

Fallbacks and failures

A fallback gives the page something to display before the island response arrives. Choose it to fit the content: a neutral placeholder can work for a small live-data region, while a meaningful static value may be better when one exists. The project must also decide how missing database records and failed requests should appear; Astro’s feature documentation does not prescribe those application-specific states.

Deployment key consistency

Astro documents a generated encryption key for server-island props. With rolling deployments, cached pages, multiple regions, or separately deployed frontend and backend pieces, key mismatches can make old page output incompatible with a newer island endpoint. Astro provides astro create-key and the ASTRO_KEY environment variable for configurations that need a reusable key. Treat it as deployment configuration: keep it secret and consistent where required, rather than exposing it to browser code. Details are in Astro’s deployment and encryption-key guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When build-time rendering is still enough

If database content only needs to be refreshed at build or deployment time, prerendering may be the simpler choice. Astro 5’s announcement discusses the combination of static and dynamic rendering, while the current guide explains how to configure on-demand routes. See the Astro 5.0 announcement and the on-demand rendering guide.

Use request-time rendering only for the freshness or personalization requirement that justifies it. If only one region changes between builds, a server island can preserve a static shell; if the whole response depends on current data, render the route on demand. If neither requirement applies, prerendering avoids adding runtime requests and infrastructure for data that can be fixed at build time.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.