Free tools Windows power users keep installed

One-click scans. No signup required.

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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Database-backed pages can stay partly static in Astro: prerender the stable page shell, then render request-time content where it is actually needed. Astro calls its built-in component feature server islands, implemented with server:defer. That is different from route-level on-demand rendering, which makes the whole selected route dynamic.

The title describes a first-person implementation, but no project code, database, host, or measured results are established here. So this guide explains the documented Astro choices without claiming a particular custom “runtime islands” implementation.

What “runtime islands” means in Astro

Astro pages are prerendered by default. With a server adapter configured, a route can instead render on demand, or a page can defer a specific component to a server island. In the latter case, the page and its fallback can be delivered first; the browser then requests the island and inserts its rendered HTML. Astro’s documented term is server island, not “runtime island.” Astro’s server-islands guide describes the feature.

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.

This is a server-rendered component delivered after the initial page response, not a component that must be hydrated as a client-side widget. Astro’s broader islands architecture describes rendering HTML and reserving dynamic regions, but that general concept should not be confused with the specific server-islands mechanism.

Choose whether the route or only a component needs request-time data

Choice What renders on demand Best fit Astro mechanism
Route-level rendering The selected route’s response The page needs current database content or request-specific logic across much of its response. Configure a server adapter and set export const prerender = false for the route.
Server island One selected component; the rest of the page can render first The page shell is stable or cacheable, but a region needs request-time data. Configure a server adapter and use server:defer, optionally with fallback content.

This distinction follows Astro’s on-demand rendering guide and server-islands guide. Neither option is a universal performance win: route rendering puts the full response on the request path, while each deferred island adds a separate request. The right choice depends on the page’s cache policy, database latency, number of dynamic regions, and behavior when a request fails.

When build-time data is enough

If records only need to appear after a deployment or build, prerendering may be sufficient. If content changes between builds and must be visible to a visitor’s request, use on-demand rendering for the relevant route or component. Astro’s Astro 5.0 announcement discusses combining static and dynamic content; the current rendering guides explain the mechanisms.

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

How to structure the database boundary

Keep the database query on the server side, and send the island only the serializable information it needs. For example, a page might render a stable article shell while a deferred component fetches a frequently changing availability indicator. This is an illustrative pattern, not a claim about a particular database-backed project:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
---
// src/pages/item/[slug].astro
export const prerender = true;
const item = await getBuildTimeItem(Astro.params.slug);
---

<main>
  <h1>{item.title}</h1>
  <Availability itemId={item.id} server:defer>
    <p slot="fallback">Checking availability…</p>
  </Availability>
</main>

The exact data-access function and query belong to the application. If the entire page must reflect current database state, this example’s prerendered route is the wrong boundary: render the route on demand instead. For either design, define what the reader sees when a record is missing or the database is unavailable rather than allowing an unexplained blank region.

Constraints that affect a server island

Props must be serializable

Pass values such as IDs, strings, numbers, and plain data rather than functions or circular object references. Keep the payload narrow: the island should receive only the context it needs. Astro notes that sufficiently long query data can cause the island request to use POST rather than GET; POST requests are not browser-cached, so large props can affect caching behavior. See the server-islands documentation.

Request context differs inside the island

A server island runs in its own context. In particular, Astro.url inside it refers to the island endpoint URL, not necessarily the original page URL. Pass required context explicitly as props, or use the documented Referer approach carefully when appropriate. Do not assume a request URL inside the island identifies the page that contained it.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers

Choose an adapter for the actual deployment target

On-demand routes and server islands need a server adapter. Astro’s current guide lists official adapters for Node.js, Netlify, Vercel, and Cloudflare; the correct option depends on where the site runs and the runtime it supports. Consult the on-demand rendering guide and adapter documentation for configuration details.

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

Keep the island encryption key compatible across deployments

Astro generates an encryption key for server-island props. In a rolling deployment, multi-region setup, or configuration where cached pages can be served alongside a newer backend, different frontend and backend bundles may not agree on that key. Astro documents astro create-key and the ASTRO_KEY environment variable for setups that need a reusable key. Treat it as a deployment secret; do not expose it in page content or client-side code. The operational guidance is in Astro’s server-islands documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to measure before choosing

Astro’s documentation establishes how these rendering modes work, but it does not establish performance results for a particular application. Compare the options using your own workload:

  • How many database-dependent regions a page has, and how often each changes.
  • Whether the stable shell can be cached independently from dynamic output.
  • The database latency and failure rate on the request path.
  • The number of requests a page makes, including each deferred island request.
  • Whether props stay small enough to preserve the desired request and cache behavior.
  • How missing records, database errors, and deployment transitions appear to visitors.

Astro quotes Preact creator Jason Miller describing islands architecture generally as server-rendered HTML with placeholders around dynamic regions that can be hydrated into widgets. That explanation is about the broader architecture, not a claim that Astro server islands use the same client-hydration model.

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.

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