Choosing Between SSR and Hybrid Rendering in Vue Storefront 2: A Decision Guide
A concise decision guide that compares SSR and Hybrid rendering in Vue Storefront 2, shows how to configure Hybrid mode, and explains how to verify the setup with headers and Lighthouse.
16 Jun 2026, 21:20 UTC

Decision and constraints
When setting up a Vue Storefront 2 (VSF2) storefront you must pick a rendering mode that satisfies several practical constraints:
- SEO‑critical pages (home, product listings, category pages) need to deliver fully rendered HTML to crawlers.
- The target First Contentful Paint (FCP) should be under 2 seconds for a good user experience.
- The team is comfortable with Vue 3 Composition API but has limited experience with custom Node.js server setup.
- The deployment environment must be able to run a Node.js process (e.g., a Docker container or a managed Node service).
Based on these constraints the decision is whether to use pure Server‑Side Rendering (SSR) or the Hybrid mode (SSR for selected routes, client‑side hydration for the rest).
Option comparison
| Mode | SEO | Initial Load (TTI/FCP) | Development Complexity | Hosting Requirement |
|---|---|---|---|---|
| SSR (full server render) | Full HTML for every route, guaranteeing crawler visibility | Slower Time‑to‑Interactive because each request hits the Node server for rendering | Higher – requires a Node server, error handling, and server‑side caching strategy | Node.js server mandatory |
| Hybrid (SSR + client‑side hydration) | SSR for pre‑configured routes; other routes rely on client‑side rendering (may need additional SEO measures) | Faster TTI for cached HTML routes; client‑only routes depend on bundle size and network | Moderate – need to define which routes get SSR, but server setup is similar to pure SSR | Can run on static hosts with a fallback Node server for SSR routes |
Trade‑offs
SSR guarantees that every page returns complete markup, which simplifies SEO and avoids the risk of missing metadata for dynamic routes. The downside is increased server cost and higher latency on each request, which can push FCP beyond the 2 s target under load.
Hybrid reduces server load by serving pre‑rendered HTML for a defined set of routes (e.g., home, product, category) and falling back to client‑side rendering for less‑SEO‑critical pages such as user account pages or admin dashboards. This approach improves TTI for the cached routes while still meeting SEO needs for the most important pages. However, it requires careful route‑level configuration: any route mistakenly left out of the SSR list will be rendered client‑only, potentially hurting crawler visibility.
Implementation steps
The following steps illustrate how to enable Hybrid mode in a VSF2 project and verify that the server emits the expected header.
1. Configure the target and SSR routes
Edit middleware/config.js (or the equivalent config file in your project) to set the rendering target and list the routes that should be server‑rendered:
// middleware/config.js
module.exports = {
target: 'hybrid',
routes: [
'/',
'/product/[slug]',
'/category/[id]',
// add any other SEO‑critical patterns here
],
// other existing configuration …
};
Placeholders [slug] and [id] follow VSF2’s dynamic route syntax; adjust them to match your actual API endpoints.
2. Build and start the application
From the project root run:
# Install dependencies if not already done
# (assumes you have yarn or npm available)
yarn install
# Production build
yarn build
# Start the Node server
yarn start
Ensure the process runs with sufficient permissions to bind to the configured port (commonly 3000). If you use Docker, expose the port and run the container as a non‑root user.
3. Verify the response header
Request a known SSR route (e.g., the home page) and inspect the headers:
curl -I http://localhost:3000/
You should see a header similar to:
x-vsf-render-mode: hybrid
Additionally, view the page source (curl http://localhost:3000/) and confirm that the HTML contains fully rendered product markup before any <script> tags that bootstrap the client‑side app.
4. Validate performance with Lighthouse
Run Lighthouse (via Chrome DevTools, the CLI, or CI) against the SSR‑enabled routes and assert:
- First Contentful Paint < 2000 ms
- SEO score > 90
For client‑only routes, expect a higher FCP but still passing Core Web Vitals thresholds; this helps confirm that the hybrid split behaves as intended.
Limitations and practical checks
Before adopting this configuration, verify the following:
- Version compatibility: The
target: 'hybrid'option is available in VSF2 LTS releases (2.x). Older versions only exposessrandspamodes; attempting to sethybridwill result in a build error. - Caching layer awareness: If you place a CDN or reverse proxy (e.g., Varnish, Cloudflare) in front of the Node server, ensure it respects the
x-vsf-render-modeheader. Otherwise, a cached client‑side shell could be served as if it were SSR output, leading to missing metadata for crawlers. - Route coverage: Periodically audit your route list. Adding a new dynamic page (e.g., a promotional landing page) without adding its pattern to the
routesarray will cause it to render client‑only, potentially affecting SEO. - Server resources: Even though Hybrid reduces load compared to full SSR, the Node server still handles SSR requests. Monitor CPU and memory usage under peak traffic to verify that the infrastructure can sustain the expected request rate.
To check that the header is correctly propagated through your caching layer, make a request via the CDN URL and look for the same x-vsf-render-mode: hybrid header. If it is missing, adjust the cache‑key or header‑forwarding settings accordingly.
Conclusion
For a Vue Storefront 2 storefront where SEO‑critical pages must be server‑rendered, the team prefers Vue 3 Composition API, and a Node.js server is available, the Hybrid rendering mode offers a balanced solution. It delivers full HTML for the routes that matter most to search engines while keeping the initial load fast for those pages and reducing server load compared to pure SSR. By configuring the target and routes in middleware/config.js, building, and verifying the x-vsf-render-mode header and Lighthouse metrics, you can confidently adopt Hybrid mode and monitor its ongoing suitability through header checks and performance audits.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.