惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
U
Unit 42
Y
Y Combinator Blog
I
InfoQ
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
量子位
Microsoft Security Blog
Microsoft Security Blog
B
Blog
The Cloudflare Blog
F
Fortinet All Blogs
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
C
Check Point Blog
S
SegmentFault 最新的问题
爱范儿
爱范儿
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
T
Tailwind CSS Blog

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 Astro 6.2 What's new in Astro - April 2026 What's new in Astro - March 2026 Astro 6.1 CloudCannon Joins Astro as an Official CMS Partner Astro 6.0 What's new in Astro - February 2026 What's new in Astro - January 2026 Astro 5.17 Supporting the future of Astro The Astro Technology Company joins Cloudflare Astro 6 Beta What's new in Astro - December 2025 What's new in Astro - November 2025 Astro 5.16 Stainless Sponsors Astro, Launches Astro-Powered Docs Platform What's new in Astro - October 2025 Astro 5.15 Spirit of Astro: meet the winning designs What's new in Astro - September 2025 Astro 5.14 Cloudflare Donates $150,000 to Support Astro's Open Source Mission Webflow Donates $150,000 to Support Astro's Open Source Mission Mux: Our Official Video Partner Unleashing creativity: How CodeTV built a video streaming platform with Astro and Mux | Astro What's new in Astro - August 2025 Astro 5.13
Server Islands
Fred Schott, Matthew Phillips · 2024-06-13 · via The Astro Blog

This is Part 3 of our series on “The Future of Astro” covering the three major features we have planned for Astro in 2024. This post introduces Server Islands: a new island architecture primitive that lets you deliver static, CDN-cached HTML page shells with injected dynamic content.

In 2021, Astro pioneered a new frontend architecture called Islands. Islands are unique because they allow Astro to automatically strip all unused JavaScript from your page, delivering faster performance without forcing you to give up your favorite UI components at dev time (React, Svelte, Vue, etc).

But frontend performance isn’t the only performance problem you’ll run into on the web. How you deliver a website to the user can be even more impactful than what you deliver, and developers are often forced to make a difficult choice: performance, or personalization?

Performance: Serve pages as static HTML, and cache aggressively. You won’t be able to personalize pages to the user, but the performance benefits, cost-savings, and simplicity of static CDN deployments are impossible to match.

Personalization: Serve pages as dynamic HTML, rendered on-demand. This forces your request through some data center that may be halfway around the world, which slows performance and increases your likelihood of failing Google’s Core Web Vitals. However, the level of control and personalization that you unlock with dynamic responses can be hard to turn down.

Performance and personalization shouldn’t be mutually exclusive. We believe that Islands architecture holds the answer to this problem as well, and we are currently working on a new feature to bring you the best of both worlds: Server Islands.

Server Islands

Server Islands are a new primitive that we are exploring for Astro, building on our existing island frontend architecture. You define a server island the same way you would a client island, but instead of using a client:* directive you would use the new server:defer directive instead:

<UserButton server:defer />

This tells Astro to skip rendering this component in the initial response and “defer” its render to later. This lets you cache the static page behind a CDN with some initial placeholder content. When the dynamic HTML has loaded, it replaces the server island on the page with the HTML result of the deferred render.

You can see this running in the prototype below. The static page loads instantly with the majority of your page content (21ms, in this example running on Vercel). The dynamic deferred component HTML then renders separately, and Astro stitches it all back together when the deferred render is complete.

Conceptually this is similar to the concept of Suspense in React, Solid, etc. but with the key difference that the deferred island is rendered as a separate HTTP request. We have intentionally avoided streaming the static content and the islands back in a single response to simplify things for your CDN of choice.

A diagram showing the server island population parts of the page from the server.

By moving all of your dynamic HTML into deferred server islands, you’re left with the best of both worlds:

  • Performance: An instant, static page shell of HTML, cached in a global CDN.
  • Personalization: Dynamic content injected anywhere you’d like on the page.

Server islands won’t make sense for every use case. Some pages may require so much dynamic content that it still makes sense to render the entire page on the server. Other sites may still wish to fetch dynamic content as JSON from API endpoints instead.

However, we believe that server islands make sense for the vast majority of personalized content in content-driven websites. The websites that we see built with Astro often mix dynamic and static content on the page. For these sites that currently can’t leverage CDN caching, server islands will likely deliver big performance wins.

Next Steps

We’re in the design phase of this feature and are thinking about trade-offs for different implementations, but prototyping is already underway.

Keep an eye out for experimental support for Server Islands in Astro in the near future. We often launch new features behind experimental flags before they are stable, which gives our users plenty of time to try out new APIs and give feedback. If you’d like to get involved earlier than that, check out the RFC and participate in the discussions now.