Cloud Architecture

Why Astro Hybrid Rendering is the Perfect Match for Multi-Tenant CMS Platforms

An exploration of how Astro’s Hybrid rendering mode allows multi-tenant applications to balance ultra-fast static speeds with real-time client isolation.

Why Astro Hybrid Rendering is the Perfect Match for Multi-Tenant CMS Platforms
  • Multi-tenant systems present a unique challenge: some clients require completely static marketing pages that load instantly, while others need complex, dynamic dashboards that read real-time database rows. Astro’s Hybrid rendering allows developers to set individual rendering rules per route, making it the ideal frontend partner for multi-tenant setups managed by a single Payload CMS instance.
    The Power of Per-Route Rendering Control By configuring your Astro project with an output of 'hybrid', every single page defaults to static pre-rendering (SSG) for maximum performance. However, you can explicitly export const prerender = false on specific routes—such as dynamic news feeds or client portals—forcing those pages to use Server-Side Rendering (SSR) to isolate tenant data on every single request.
    Why this hybrid approach saves infrastructure costs:
    A New Standard for SaaS Combining Payload’s multi-tenant database structuring with Astro's hybrid server capabilities provides a highly scalable foundation capable of handling millions of hits without spiking cloud hosting bills.
    • Drastically Reduced Database Load: Global landing pages are cached as plain HTML, meaning they don't query your Payload database on every user hit.
    • Dynamic Tenant Detection: SSR routes can read the incoming request hostname, fetch the matching tenant configuration from Payload, and serve tailored client content dynamically.
    • On-Demand Cache Refreshing: Use Incremental Static Regeneration (ISR) strategies to update static pages the exact second content changes in the CMS.