Choosing a Render Mode

May 1, 2026 · View on GitHub

This guide helps you choose the right Abies render mode for your project. All four modes use the same Program<TModel, TArgument> interface — you can switch modes at any time without changing your MVU code.

Quick Reference

ModeBest ForFirst PaintTime to InteractiveConnectionJS Payload
StaticContent pages, SEO⚡ FastestN/ANone0 KB
InteractiveServerInternal tools, data-heavy apps⚡ Fast⚡ InstantWebSocket~15 KB
InteractiveWasmPWAs, offline apps⚡ Fast⏳ After WASM loadsNone~1.1 MB
InteractiveAutoPublic-facing apps⚡ Fast⚡ InstantWebSocket → None~1.1 MB

Decision Matrix

Start with these questions:

1. Does the page need interactivity?

If no → Static. This gives you the fastest first paint, zero JavaScript, and works with JavaScript disabled. Perfect for marketing pages, documentation, SEO-critical content.

2. Does the app need to work offline?

If yes → InteractiveWasm. The .NET runtime runs entirely in the browser. Combined with a service worker, the app works without any server connection.

3. Is first-interaction latency critical?

If yes → InteractiveServer or InteractiveAuto. Both provide instant interactivity because the server starts processing events immediately — no waiting for a WASM bundle to download.

4. Can you maintain a persistent WebSocket connection?

If yes → InteractiveServer. This is the simplest server-side mode. Each client gets a server-side Session that holds the MVU runtime.

If no → InteractiveAuto. The server handles initial interactions, then the WASM runtime takes over and the WebSocket is closed.

For transport/session details, see InteractiveServer and InteractiveAuto Lifecycle.

Scenarios

🏢 Internal Business Application

Recommended: InteractiveServer

  • Users are on a reliable network (corporate LAN/VPN)
  • App accesses databases, APIs, secrets directly on the server
  • Persistent WebSocket connection is acceptable
  • No need for offline support
  • Instant interactivity without WASM download

🌐 Public-Facing SaaS Application

Recommended: InteractiveAuto

  • First impression matters — instant interactivity on first visit
  • Users may have slow connections (WASM download takes time)
  • Long sessions should eventually be connectionless (scalability)
  • Server resources are shared across many users

📱 Progressive Web App (PWA)

Recommended: InteractiveWasm

  • Must work offline
  • Installed on device, runs like a native app
  • No persistent server connection needed
  • Latency-sensitive interactions (everything is client-side)

📝 Content Website / Blog

Recommended: Static

  • SEO is the priority
  • Content doesn't need interactivity
  • Fastest possible first paint
  • Works with JavaScript disabled
  • Can be served from a CDN

📋 Mixed Application

Recommended: Mix modes per page

Abies render modes are per-page, not per-application. A single server can serve:

  • Static HTML for the landing page
  • InteractiveServer for the admin dashboard
  • InteractiveWasm for the public-facing editor
app.MapGet("/", () => Page.Render<Landing, LandingModel, Unit>(new RenderMode.Static()));
app.MapAbies<Dashboard, DashboardModel, Unit>("/admin", new RenderMode.InteractiveServer());
app.MapAbies<Editor, EditorModel, Unit>("/editor", new RenderMode.InteractiveWasm());

Performance Implications

MetricStaticInteractiveServerInteractiveWasmInteractiveAuto
First Paint~20 ms~60 ms~60 ms~60 ms
Time to InteractiveN/A~60 ms~4–5 s (WASM load)~60 ms
Interaction LatencyN/ANetwork RTT~0 msNetwork RTT → ~0 ms
Server Memory0~2 MB/session0~2 MB (temporary)
BandwidthHTML onlySmall binary patchesWASM bundle + patchesBoth (transition)

Migration Between Modes

Because all modes share the same Program<TModel, TArgument> interface, switching is a configuration change:

// Change one line to switch from WASM to Server:
// Before:
var html = Page.Render<MyApp, MyModel, Unit>(new RenderMode.InteractiveWasm());
// After:
var html = Page.Render<MyApp, MyModel, Unit>(new RenderMode.InteractiveServer());

Your Initialize, Transition, View, and Subscriptions functions remain identical.

Note: The command interpreter may need different implementations for browser vs. server. Browser-side interpreters use browser APIs (fetch, localStorage); server-side interpreters use server APIs (HttpClient, database). The MVU logic itself is unchanged.

Next