Architecture of Server-Side Rendering vs Client-Side Rendering0%
React 18 Streaming SSR and Selective Hydration

Architecture of Server-Side Rendering vs Client-Side Rendering

Beginner12 min read•Updated: Jul 11, 2026
Study MaterialsCheatsheet

Architecture of Server-Side Rendering vs Client-Side Rendering

1. The Tale of Two Rendering Architectures

In modern web development, how HTML is produced and delivered to the user's browser defines the fundamental performance and SEO characteristics of your application.

The two foundational paradigms are:

  1. 1
    Client-Side Rendering (CSR): Traditional React SPAs (e.g. standard Vite apps).
  2. 2
    Server-Side Rendering (SSR): Modern full-stack React frameworks (e.g. Next.js, Remix).
Output
Client-Side Rendering (CSR) Timeline:
[1. User requests URL] ──► [Server returns blank HTML shell: <div id="root"></div>]
──► [Browser downloads 500KB JS bundle]
──► [Browser executes JS, builds VDOM, fetches API data]
──► [Content FINALLY visible to user!] (Slow FCP)
 
Server-Side Rendering (SSR) Timeline:
[1. User requests URL] ──► [Node.js server renders React to complete HTML string]
──► [Server returns fully-populated HTML document]
──► [Content IMMEDIATELY visible to user!] (Fast FCP)
──► [Browser downloads JS and "Hydrates" interactive listeners]

2. Comparing Key Performance Metrics

1. First Contentful Paint (FCP)

The timestamp when the browser first renders any text or image on screen:

  • CSR: Poor. The user stares at a blank white screen while the JavaScript bundle downloads and executes.
  • SSR: Exceptional. The user receives pre-rendered HTML containing text and layout almost immediately.

2. Search Engine Optimization (SEO) & Social Sharing

  • CSR: Weak. While Googlebot executes JavaScript, many web crawlers (Twitter/X cards, Facebook Open Graph, LinkedIn, WhatsApp scrapers) do not execute heavy client bundles. They only read the raw HTML shell, seeing blank meta tags and no content.
  • SSR: Flawless. Every page arrives with complete semantic HTML, text content, and dynamic <meta> tags populated.

3. Time to Interactive (TTI)

The timestamp when the page responds to clicks and keystrokes:

  • CSR: Matches FCP (once JS loads, the app is immediately interactive).
  • SSR: FCP happens fast, but there is a brief window where the page is visible but not yet interactive until Hydration completes.

3. The Concept of Hydration

When an SSR server streams HTML to the browser:

  • The user sees real buttons, headings, and tables.
  • However, those elements have no event listeners attached yet! HTML cannot store JavaScript functions.

Hydration is the process where client-side React:

  1. 1
    Downloads the JavaScript bundle.
  2. 2
    Traverses the pre-existing DOM generated by the server.
  3. 3
    Attaches event listeners (onClick, onChange) and initializes component state.
  4. 4
    Makes the static HTML fully interactive!

4. Architectural Trade-offs

CriterionClient-Side Rendering (CSR)Server-Side Rendering (SSR)
Server Cost / ComputeLow (Static file hosting on S3/CDN)High (Requires Node.js runtime/Edge workers)
SEO & CrawlersRequires workarounds / pre-renderingNative, instant, and perfect
Initial Page LoadSlower on mobile / 3GBlazingly fast
Subsequent NavigationInstantaneousInstantaneous (Acts as SPA after hydration)
Developer ComplexitySimple (Pure frontend)Higher (Managing server vs client environments)

Interactive Quiz

Practice Quiz

Question 1
What is the primary difference between Client-Side Rendering (CSR) and Server-Side Rendering (SSR)?
Question 2
What is "Hydration" in React SSR architecture?
Question 3
Why is SSR dramatically superior for SEO and social media link previews (Open Graph)?
Question 4
What metric represents the moment when visual content first appears on the user's screen?
Question 5
What is a primary trade-off of using Server-Side Rendering over Client-Side Rendering?
Next Lesson

React 18 Streaming SSR and Selective Hydration

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

PrevNext