Salesforce Architecture
Jitendra's Blog
ARCHITECT'S GUIDE

Salesforce LWR Experience Cloud

A candid, implementation-tested guide to Lightning Web Runtime. Learn what the marketing doesn't tell you about limitations, migration challenges, and when LWR is the right choice.

7
Critical Limitations
500
Max Routes per Site
0
Generic Record Pages
~50%
Faster Page Loads

1 What is Lightning Web Runtime (LWR)?

Lightning Web Runtime is Salesforce's next-generation framework for building Experience Cloud sites. According to the official Salesforce developer documentation, unlike Aura-based sites that render components dynamically at runtime, LWR takes a fundamentally different approach by pre-compiling and caching static content during the publish process.

Core Promises of LWR

Sub-second Page Loads

Through static content delivery and CDN caching, LWR delivers significantly faster page loads than Aura sites.

Standards-Based Development

Built on modern web technologies (HTML, JavaScript, CSS) without proprietary abstractions.

Enhanced Security

Uses Lightning Web Security (LWS) instead of Lightning Locker for better component isolation.

Future-Proofing

All new Experience Cloud features and enhancements will be built exclusively for LWR.

Salesforce Experience Builder interface showing LWR site design with HTML Editor, content management, and responsive preview across devices
Experience Builder interface for LWR sites: Drag-and-drop components, HTML editor, CMS content integration, and responsive design preview.

2 Understanding LWR Architecture

How LWR Achieves Performance

The fundamental architectural difference between Aura and LWR lies in when content is generated. The Trailhead module on LWR explains this comprehensively:

Salesforce LWR Architecture Stack showing Static and Dynamic layers including Lightning Web Components, Experience Page, Salesforce Design System, Lightning Web Runtime, Lightning Data Service, and Lightning Web Security
LWR Architecture: Static layers (LWC, Design System, LWR, LDS, LWS) are pre-compiled at publish time, while Salesforce CRM data remains dynamic.
Aspect Aura Sites LWR Sites
Rendering Dynamic at runtime Pre-compiled at publish time
Component Changes Immediate (no republish needed) Requires republishing
Caching Limited server-side caching Aggressive CDN caching
Content Delivery Server-generated per request Static files from CDN edge
Security Model Lightning Locker Lightning Web Security (LWS)

Key Insight

When you publish an LWR site, Salesforce essentially takes a "snapshot" of your codebase. The framework, components, and UI layer are compiled into static, immutable, and cacheable resources stored in Salesforce's CDN. Every time you change an LWC component, you must republish for changes to take effect.

3 Performance Benefits Explained

Why LWR is Faster

The performance gains in LWR are real and measurable, stemming from several architectural decisions documented in the Salesforce Help article on LWR basics:

  1. Static Content Generation - Pages are generated at build time, not runtime
  2. CDN Distribution - HTTP/3 protocols serve content from edge locations globally
  3. Reduced Server Load - No dynamic component rendering per request
  4. Optimized Caching - All static resources are HTTP cacheable with long TTLs

Reality Check

If you end up building 10+ custom components as workarounds for missing LWR functionality, your "faster" LWR site may not be faster at all. Page performance is ultimately the combined performance of all components, and custom components often can't match the optimization of standard components.

4 Critical Limitations Architects Must Know

This is where marketing diverges from reality. Based on real-world implementation experiences with enterprise deployments (78,000+ members, 120+ audience segments), here are the limitations that will impact your architecture decisions. The official LWR limitations documentation covers some of these:

No Generic Record Pages
Must create object-specific pages for record display
Limited Visibility Rules
Cannot reference profiles, permissions, or domains
No Page Variations
Need separate pages for different themes/audiences
CMS Limitations
News and Announcements not fully supported
Dynamic Navigation
Merge fields don't work in URLs
No CSS Editor
Must use SFDX metadata for global styles

1. Record Pages: No Generic Record Detail Page

Unlike Aura templates, LWR has no generic record pages. This means:

2. Audiences vs. Visibility: A Fundamental Gap

Aura's robust audience targeting system is replaced by "Visibility Rules" in LWR, which is significantly more limited. The Salesforce Help article on visibility rules explains the available options:

Feature Aura Audiences LWR Visibility
Starting Point User, Profile, Domain, Custom Permissions, Audiences User records, Contact fields, Account fields only
Rule Reusability Can reuse across components Must rebuild from scratch for each component
Profile-based Rules Supported Not directly supported
Custom Permissions Supported Not supported
Domain-based Rules Supported Not supported

Real-World Impact

Organizations with complex audience segmentation (100+ audiences) face significant challenges. You cannot simply reference existing visibility rules for new components - each rule must be configured from scratch.

3. Page Variations: Gone

In Aura, you could create multiple variations of a page for different audiences. In LWR, there are no page variations.

4. CMS Collections: Limited Content Type Support

5. Navigation: Merge Fields Don't Work in URLs

This is a significant limitation that affects dynamic record navigation:

6-7. Missing Components and CSS Changes

5 Migration Considerations and Challenges

Component Migration

The most significant migration effort involves components. According to the Salesforce migration considerations guide:

URL Structure

Page Layout Conversion

Route Limits

LWR sites support up to 500 routes (unique URLs). For optimal performance, keep routes below 250. Use dynamic content instead of creating individual pages for each content item.

6 When to Migrate: A Decision Framework

LWR is a Good Fit When:

  • New Implementation - Starting fresh without legacy Aura components
  • Simple Site Structure - Limited audience segmentation needs
  • Performance is Critical - High-traffic public-facing sites
  • Strong LWC Development Team - Resources to build custom components
  • Minimal Record-Based Pages - Site doesn't heavily depend on CRM record displays

Consider Waiting When:

  • Complex Audience Requirements - 50+ audience segments with intricate rules
  • Heavy CRM Integration - Site displays many record types on various pages
  • Legacy Aura Investment - Significant custom Aura component development
  • Limited LWC Resources - Team not comfortable building custom components
  • CMS-Heavy Sites - Heavy reliance on News, Announcements, Carousels

"To be honest, if I were a customer with the experience I have now, I wouldn't recommend switching to LWR right now. It's super early. It's a fresh product. It's not fully ready for complex enterprise use cases. My recommendation: please wait until LWR is more mature and feature-complete."

- Enterprise Implementation Team Feedback

7 Practical Workarounds and Solutions

For Audience Targeting

Implement a custom visibility solution:

  1. Create component variations instead of page variations
  2. Use Expression-Based Visibility (Summer '23+) for enhanced LWR sites
  3. Build custom LWC that checks user attributes and conditionally renders content
  4. Consider using Flows for complex audience logic

For Dynamic Navigation

  1. Create intermediate redirect pages
  2. Build custom LWC components that query record IDs via Lightning Data Service
  3. Implement programmatic navigation using lightning/navigation API

For Missing Components

Develop a reusable component library:

Silver Lining

These custom components can be leveraged across multiple projects, turning limitations into opportunities for reusable assets and accelerators.

8 Strategic Recommendations for Architects

1. Conduct a Thorough Assessment

Before committing to LWR migration:

2. Plan for Custom Development

Budget for building custom components to replace missing functionality:

3. Consider a Hybrid Approach

For large existing sites, as recommended by LaunchPad Lab's migration guide:

4. Stay Current with Releases

Salesforce enhances LWR with each release. Key recent improvements from the Salesforce Release Notes:

5. Document Your Decisions

Create an Architecture Decision Record (ADR) documenting:

Key Takeaway

LWR represents the future of Salesforce Experience Cloud. The performance benefits are real, and all new platform enhancements will target LWR. However, don't let marketing hype drive technical decisions. Conduct honest assessments, understand the limitations, plan for custom development, and make informed decisions based on your organization's specific requirements.

Have Questions About LWR Migration?

This analysis is based on official Salesforce documentation and real-world implementation experiences from enterprise Experience Cloud deployments.

Contact Me for Consultation
Link copied to clipboard!
Previous Post
Agentforce Vibes: The Complete Developer Guide to Enterprise Vibe Coding
Next Post
ServiceNow ITSM Complete Beginner’s Guide
Archives by Year
2025 16 2024 2 2023 9 2022 8 2021 4 2020 18 2019 16 2018 21 2017 34 2016 44 2015 54 2014 30 2013 31 2012 46 2011 114 2010 162
Search Blog

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading