Infrastructure and Hosting Requirements
You'll learn: How the hosting and infrastructure needs differ between CSR, SSR, and SSG, so you can choose the right deployment strategy for your approach.
The Hosting Landscape
Each rendering approach you've learned—Client-Side Rendering (CSR), Server-Side Rendering (SSR), and Static Site Generation (SSG)—requires different infrastructure to run effectively.
Static Hosting (CSR and SSG)
With CSR and SSG, your application consists of static files: HTML, CSS, JavaScript, and assets. These can be served from:
- Static file hosts (like Netlify, Vercel, or AWS S3 + CloudFront)
- CDNs (Content Delivery Networks)
- Simple web servers (nginx, Apache)
Think of this like storing books in a library—the books (files) just sit there waiting to be picked up. No cooking required, just retrieval. This is the simplest and cheapest option because you're just serving files.
Node Servers (SSR)
SSR requires a running Node.js server to render pages on each request. You need:
- Always-on server instances (EC2, DigitalOcean droplets, traditional VPS)
- Container orchestration (Docker, Kubernetes)
- Server monitoring and scaling capabilities
This is like running a restaurant—you need a kitchen (server) actively cooking (rendering) each order (request) as it comes in.
Serverless Functions (SSR Alternative)
Modern SSR can also use serverless functions that spin up on-demand:
- Function-as-a-Service platforms (AWS Lambda, Vercel Functions, Netlify Functions)
- Pay per request instead of constant uptime
- Automatic scaling
Think of this as a food truck that only shows up when customers arrive—more cost-effective for variable traffic.
Key Takeaway: CSR and SSG need only static hosting (cheapest, simplest), SSR requires active Node servers or serverless functions (more complex, higher cost), and your choice impacts both your infrastructure budget and deployment complexity.