Skip to content
tezvyn:

Compare SSR, SSG, and ISR trade-offs in meta-frameworks

Source: svelte.devHardHow cards are made

Compare SSR, SSG, and ISR trade-offs in meta-frameworks

What it tests: matching rendering modes to build time, freshness, and scale. Outline: contrast SSR per-request cost with SSG fast CDN delivery but stale content and long builds, then show ISR as lazy regeneration post-deploy.

What's really being asked

Whether the candidate understands that rendering is not one-size-fits-all and can map trade-offs between server effort, build time, cacheability, and freshness to product requirements. The interviewer wants to see nuanced decision-making about when to pay per request versus paying at build time versus deferring cost to post-deployment regeneration. They also want to know if you recognize that these modes can coexist within a single codebase rather than forcing an architectural split into separate services.

The full answer

First, SSR renders the initial page on each request which improves SEO and perceived performance but requires a running server and adds latency on every hit. Second, SSG prerenders pages at build time so they can be served from a CDN for maximum speed and scale, yet updates require a new build and very large sites face long build times. Third, ISR serves a static version immediately and regenerates the page in the background after deployment, which avoids the full build penalty for massive sites while keeping delivery fast. Fourth, SvelteKit specifically supports mixing these modes across pages and offers adapter-vercel for ISR, while adapter-static handles traditional SSG. The candidate should note that SvelteKit defaults to SSR for the first page and CSR for subsequent navigation, a hybrid called transitional apps, and that you can remove JavaScript entirely on specific pages with csr set to false or data-sveltekit-reload if needed.

The mistakes people make

Claiming ISR is just a CDN cache header or that it works identically on every hosting platform. Saying SSG is always faster than SSR without acknowledging build time or update lag. Asserting that SvelteKit cannot mix rendering strategies when the docs explicitly allow prerendering some routes while dynamically server-rendering others. Recommending a full SPA for content that changes frequently and needs SEO. Another mistake is assuming static generation means zero server involvement; in SvelteKit you can still use server files alongside prerendered pages if you choose a hybrid adapter.

What usually comes next

How would you handle authentication on an ISR page that shows personalized data? At what scale does SSG build time become prohibitive and how would you measure it? How do you invalidate ISR content before the automatic regeneration triggers? Can you combine SSR and SSG within the same SvelteKit project and how would you configure that? They might also ask how adapter-static differs from adapter-vercel in terms of routing and whether ISR can be used alongside edge functions.

A concrete example

An e-commerce site with ten thousand product pages where prices and inventory change multiple times per day. Traditional SSG would require a rebuild on every price change, leading to hour-long builds and stale buy buttons. Pure SSR would mean every product view hits the server, increasing cost and response time under traffic spikes. ISR with adapter-vercel lets you prerender the catalog at build for instant loads, then regenerate individual product pages in the background after deployment as inventory updates, keeping content fresh without rebuilding the entire site. This approach scales because only the changed SKUs regenerate, not the whole catalog, and shoppers still receive sub-second page loads from the CDN edge.

Interview question

An e-commerce site has 10,000 product pages with prices that change hourly alongside user-specific account pages. Which SvelteKit approach best balances performance, freshness, and architecture simplicity?

  • a.Split the project into separate services: a static site for products and an SSR service for accounts
  • b.Use adapter-vercel with ISR for product pages and dynamic SSR for account pages in the same projectCorrect
  • c.Prerender all pages with adapter-static and trigger a full rebuild whenever inventory updates
  • d.Use pure SSR for all pages to guarantee fresh prices and personalized data on every request
Why?

Adapter-vercel enables ISR, which serves cached product pages instantly and regenerates them in the background after deployment, avoiding hour-long rebuilds for frequent price changes while still allowing dynamic SSR for personalized account pages. Option C is tempting because SSG offers fast CDN delivery, but it would require a full rebuild every time inventory changes, making it impractical for thousands of pages that update multiple times per day.

Just read this? Test yourself on what you have been reading.

Read the original → svelte.dev

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on ssr — each one lists the topics its interview covers.

See open roles