Skip to content
Episode 14 1 hour 2 minutes

WebFragments at Scale – With Natalia Venditto & Igor Minar

Key Takeaways from our conversation with Natalia Venditto & Igor Minar

Natalia Venditto & Igor Minar

Principal PM for JavaScript DX at Microsoft • Senior Director of Engineering at Cloudflare, co-creator of Angular

Señors @ Scale host Neciu Dan talks with Microsoft’s Natalia Venditto and Cloudflare’s Igor Minar about WebFragments — a new micro-frontend model that isolates JavaScript and DOM at the browser boundary, enables instant SSR through fragment piercing, and lets large teams ship independently without dependency lockstep.

🎧 New Señors @ Scale Episode

This week, I sat down with Natalia Venditto and Igor Minar to unpack WebFragments, a radical rethink of how we build for the web.
It’s a conversation about real-world architecture: isolating JavaScript contexts, encapsulating DOMs, streaming server-rendered fragments into client shells, and finally delivering on the promise of micro-frontends that actually scale.


🧩 Main Takeaways

1. WebFragments achieve real independence.
Most micro-frontend architectures fail because they only decouple deployment, not dependencies. WebFragments go further — each fragment owns its runtime, framework, and state. Teams can move at different speeds without shared upgrade pain.

2. “Docker for the browser.”
Each micro-frontend runs inside its own JavaScript container, just like server containers run isolated workloads. WebFragments encapsulate logic and DOM independently but still render within one cohesive document.

3. Smart caching keeps performance high.
Fragments share downloaded assets through the network cache. If multiple fragments use the same React version, it’s fetched once but executed separately — no shared memory, no collisions.

4. Reframing: the hybrid isolation model.
WebFragments use iframes only to spawn new JavaScript contexts. The DOM, however, is rendered in the main document through Shadow DOM.
This gives you:

  • Hard isolation for scripts
  • Visual and CSS encapsulation
  • Accessibility and focus handling that standard iframes can’t provide

5. Fragment Piercing: instant SSR inside SPAs.
Traditional SSR doesn’t help if your client shell takes seconds to bootstrap. “Piercing” streams server-rendered HTML directly into the main document before the shell loads, showing users a live, interactive UI instantly.

6. Built on web standards.
No proprietary runtime. WebFragments rely on existing browser APIs — iframes, Shadow DOM, BroadcastChannel, History, and Location APIs.

7. BroadcastChannel for communication.
Fragments talk to each other via the browser’s native BroadcastChannel API, avoiding custom event buses or global stores. The catalog and cart in the demo communicate this way seamlessly.

8. Middleware removes CORS issues.
All requests originate from a single domain, then a middleware layer routes them to the correct backend — Cloudflare, AWS, Azure, or even a PHP endpoint.
Result: no CORS setup, no origin juggling, total vendor freedom.

9. Bound vs. Unbound Fragments.
Bound fragments update the browser URL (e.g., product detail pages).
Unbound fragments manage local state only (e.g., a shopping cart).
Teams choose per-fragment coupling based on their UX needs.

10. Proven in production at Cloudflare.
WebFragments aren’t just theoretical. Cloudflare is migrating its production dashboard using them — incrementally, page by page — without breaking existing systems.

11. Roadmap and future capabilities.
Next steps include nested fragments, out-of-order streaming, asset-sharing strategies, and a stable 1.0 release.
Performance tests already show near parity with standalone apps.


⚙️ Technical Deep Dive

JavaScript Isolation via Iframes

Browsers lack a direct API to create new JS realms, but iframes provide one.
Each fragment runs in its own iframe, gaining a fresh JS environment, its own global scope, and no shared memory with others.
That means each team can upgrade or change frameworks independently — React, Qwik, Angular, Vue — all running side by side.

DOM Encapsulation via Shadow DOM

The UI doesn’t render inside the iframe. Instead, WebFragments map DOM operations into the main document under a Shadow Root.
This means:

  • Full encapsulation of IDs and CSS
  • No z-index or overflow nightmares
  • No focus or accessibility issues common with nested iframes

“Application runs in the iframe, but DOM operations happen in the main document. We use Shadow DOM to create an isolation boundary for each fragment.”

This combination — iframe logic, Shadow DOM rendering — is called Reframing, and it’s what makes WebFragments possible.

Fragment Piercing: Solving the SPA Blank Screen

Piercing solves one of the oldest frontend problems: the empty white screen before hydration.
Server-rendered fragments stream HTML directly into the live document before the SPA shell exists.
That means users can see and interact with critical UI (like a login form) instantly, while the rest of the app boots in the background.

“We want the initial rendering to be as fast as possible — not just visible, but interactive.”

Cross-Fragment Communication

Instead of a shared global store or event hub, fragments communicate with BroadcastChannel.
Each fragment can publish and subscribe to messages, decoupling communication while staying within native browser APIs.

Routing and State Control

Bound fragments tie navigation to browser history and URLs; unbound fragments remain stateful but internal.
This dual model gives teams granular control over how much their fragment integrates with the global app shell.

Middleware and Single-Origin Architecture

By routing all requests through a single origin, WebFragments eliminate CORS complexity.
A vendor-agnostic middleware inspects incoming requests and forwards them to the right fragment backend — Cloudflare Workers, Azure Containers, AWS Lambdas, or even traditional servers.

Debugging and Tooling

Developers can use standard browser DevTools:

  • Switch between frames to inspect fragment internals.
  • Inspect shadow roots to debug UI boundaries.
  • Neutralized script tags keep React’s virtual DOM indexing stable during hydration.

Production Results

Cloudflare is migrating their main customer dashboard — one of their most business-critical SPAs — to WebFragments.
Migration starts small: one route, one page, one fragment at a time.
Users can’t tell which pages run WebFragments, but the team benefits from faster iteration and smaller failure domains.


💬 Favorite Quotes

“WebFragments, unlike module federation, actually scale.”
“We are fully encapsulating a context of execution for JavaScript, and encapsulating the DOM — yet it’s one single document.”
“Piercing lets you show server-rendered UI before the client shell even exists.”
“We don’t have CORS issues because the entire deployment lives on a single origin.”


🧠 What I Learned

  • The next leap for micro-frontends isn’t better bundling — it’s browser-level virtualization.
  • Real independence comes from isolating both runtime and DOM, not just build pipelines.
  • Server-side rendering can coexist with SPA shells through fragment streaming, not full rewrites.
  • Vendor neutrality and standards-based design are what make WebFragments future-proof.

🎯 Also in this Episode

  • How shared dependencies couple entire orgs to a single release train
  • The evolution of micro-frontends beyond Module Federation
  • Why iframes failed before and how reframing fixes their flaws
  • A preview of nested fragments and out-of-order streaming
  • How enterprise teams can modernize incrementally without rewrites

🎧 Listen Now

🎧 Spotify
📺 YouTube
🍏 Apple Podcasts (coming soon)


Episode Length: 1h 2m of deep technical exploration on the future of frontend architecture.
If you’ve ever hit the limits of module federation or fought shared dependency chaos, this episode will change how you think about composition on the web.

Happy scaling,
Dan

💡 More Recent Takeaways

Hypermedia at Scale with Carson Gross
Episode 53

Señors @ Scale host Neciu Dan sits down with Carson Gross, creator of HTMX, principal at Big Sky Software, and computer science professor at Montana State University. Carson has been programming for more than 30 years, from HyperCard on a family Mac to Excel macros for an industrial engineering firm, a JVM language called Gosu, a Rails startup, and the 2012 library Intercooler.js that he rewrote without jQuery during COVID and released as HTMX. His argument is that the web was built as a hypermedia system, that links and forms are control logic living inside the document, and that most of what we call REST today fails the one constraint Roy Fielding cared about. He also covers which apps HTMX is wrong for, what changed in HTMX 4 and why 3 was skipped, and why his students now sit pencil and paper exams. It is a conversation about using the browser as the hypermedia client it was built to be.

Performance at Scale with Ryan Townsend
Episode 52

Señors @ Scale host Neciu Dan sits down with Ryan Townsend, Principal Product Manager for Performance at Cloudflare, where he owns real user monitoring and the wider performance measurement remit. Ryan has over 20 years in web technology and a decade as a CTO: he co-founded Shift Commerce, the first enterprise scale headless SaaS, and was CTO of Matalan Direct after the business he built came second in Shopify's Build a Business competition with only three months of trading. We cover why the 'Rails doesn't scale' story was always a myth, the resume driven development he kept finding as a fractional CTO, the personalization script that claimed zero performance impact and cost seconds at P90, and how Shift ran over 99% cache hit ratios by splitting the anonymous page from the basket.

Design Systems at Scale with Szymon Chudy
Episode 51

Señors @ Scale host Neciu Dan sits down with Szymon Chudy, Software Engineer at Netflix on the Hawkins team, which builds the design system behind thousands of internal applications used to produce the shows you watch. Before Netflix, Szymon spent two and a half years at Lokalise, growing from senior to staff frontend engineer and leading frontend direction across teams, and before that he toured Poland as a reggae guitarist while freelancing as a web developer in the off season. From why the source of truth for a design system lives in code, to Hawkins Consumer versus Hawkins Professional, to the UI paved road that changes what freedom and responsibility mean at Netflix, to measuring the team on adoption rate and shipping codemods and agent skills for every breaking change, to what being an informed captain who farms for dissent means in practice, this is the design system conversation for anyone maintaining a platform other engineers have to choose to use.

Agentic Systems at Scale with Vilva Athiban
Episode 50

Señors @ Scale host Neciu Dan sits down with Vilva Athiban, Lead AI Engineer at Omio, one of Europe's leading travel platforms, where he architects and ships agentic AI systems in production. Vilva designed and delivered Omio AI, along with the MCP integrations that connect AI agents to the company's systems. He never set out to switch from JavaScript to AI: in June 2024 Omio picked two people to start an AI team reporting to the CEO and CTO, and he learned on the job, from his first API call to an LLM up to a consumer-facing agent whose backend runs on nothing but MCP. From why a bigger model with medium thinking came out cheaper than the mini, to capping tool calls because LLMs are built for token maxing, to the whale hunting request that showed his team guardrails are subjective, this is a conversation about what production agentic systems look like once the tutorials run out.

📻 Never Miss New Takeaways

Get notified when new episodes drop. Join our community of senior developers learning from real scaling stories.

💬 Share These Takeaways

Share:

Want More Insights Like This?

Subscribe to Señors @ Scale and never miss conversations with senior engineers sharing their scaling stories.