Build Time vs Request Time
You'll learn: the critical difference between when pages are created at build time versus on-demand at request time, and why this distinction fundamentally affects performance.
The Core Difference
In Static Site Generation (SSG), pages are pre-built once during deployment (build time). In Server-Side Rendering (SSR), pages are generated fresh for every user request (request time). This timing difference has massive implications for speed and server load.
Build Time Generation
Think of build time like a bakery preparing bread before the store opens. All pages are generated once, saved as static HTML files, and served instantly to every visitor. This happens during your deployment process, not when users visit.
Advantages:
- Near-instant page delivery (just serving a file from CDN)
- Zero server computation per request
- Scales effortlessly to millions of users
- Predictable performance
Limitations:
- Content is "frozen" until next build
- Build time grows with page count
- Data changes require rebuilding
Request Time Generation
Request time is like a restaurant cooking each meal to order. Every user request triggers the server to fetch data, render HTML, and send it back. This happens in real-time for each visitor.
Advantages:
- Always fresh, up-to-date content
- Personalized per-request
- No build step delays
Limitations:
- Slower response (server must do work)
- Server load increases with traffic
- Requires always-on infrastructure
- Variable performance under load
Key Takeaway: Build time pre-generates pages once for fast delivery but static content; request time generates pages on-demand for freshness but at the cost of speed and server resources per user.