Questions
7 of 33
1Explain server-side rendering (SSR) in Next.js.
2List the benefits of Server-Side Rendering in Next.js.
3What are server components?
4How to use server components in next js?
5What is the React Server Component Payload (RSC)?
6Describe how server components are rendered.
7Describe server rendering strategies
8How can you keep Server-only Code out of the Client Environment
9What are the issues of using context provider at the root of the application?
10List dynamic functions available to server components.
11List all Dynamic APIs.
12How do we opt for Static Rendering, Dynamic Rendering and Streaming?
13Explain the difference between SSR, SSG, ISR, and CSR in Next.js. When would you choose each?
14How does getServerSideProps work internally? What is its execution context?
15What are the performance trade-offs of SSR vs SSG in a high-traffic production app?
16How does Next.js handle hydration? What is a hydration mismatch, and how do you debug it?
17What happens when getServerSideProps throws an error? How do you handle it gracefully?
18How would you architect a Next.js app that needs both personalised (SSR) and cacheable (SSG) pages at scale?
19Explain the App Router vs Pages Router SSR model differences. How does React Server Components change the SSR paradigm?
20How do React Server Components (RSC) differ from traditional SSR? Can they be used together?
21How does streaming SSR work in Next.js 13+? What role does Suspense play?
22How would you implement partial hydration or Islands Architecture in Next.js?
23Explain how Next.js handles data fetching waterfall problems in SSR and how you'd mitigate them.
24How would you implement partial hydration or Islands Architecture in Next.js?
25How do you implement caching strategies for SSR responses in Next.js? (CDN, Cache-Control, stale-while-revalidate)
26How would you reduce TTFB (Time to First Byte) in an SSR-heavy Next.js app?
27What's the difference between fetch caching in the App Router vs traditional getServerSideProps?
28How do you avoid redundant database/API calls across multiple server components on the same page?
29How do you securely handle authentication in SSR? What are the risks of passing tokens via cookies vs headers?
30How do you prevent sensitive server-side data from leaking to the client bundle?
31How would you implement role-based rendering on the server without exposing protected routes to the client?
32How do you debug SSR-only issues that don't appear in local development?
33How can we control dynamic rendering behaviour in next js?
07 / 33

Describe server rendering strategies

Difficulty: 5/10
SSR, SSG, ISR
Static Rendering (Default)
  1. 1

    With Static Rendering, routes are rendered at build time, or in the background after data revalidation. The result is cached and can be pushed to a Content Delivery Network (CDN). This optimization allows you to share the result of the rendering work between users and server requests. Static rendering is useful when a route has data that is not personalized to the user and can be known at build time, such as a static blog post or a product page.

Dynamic Rendering:
  1. 1

    With Dynamic Rendering, routes are rendered for each user at request time. Dynamic rendering is useful when a route has data that is personalized to the user or has information that can only be known at request time, such as cookies or the URL's search params.

  2. 2

    In Next.js, you can have dynamically rendered routes that have both cached and uncached data. This is because the RSC Payload and data are cached separately. This allows you to opt into dynamic rendering without worrying about the performance impact of fetching all the data at request time.

  3. 3

    During rendering, if a dynamic function or uncached data request is discovered, Next.js will switch to dynamically rendering the whole route.

Streaming:
  1. 1

    With Streaming, routes are rendered on the server at request time. The work is split into chunks and streamed to the client as it becomes ready. This allows the user to see a preview of the page before it's fully rendered. Streaming is useful for lower-priority UI, or UI that depends on slower data fetches that would block rendering for the whole route.

Scenario Questions

0-2 years experience

  1. 1If you need to show a product page with SEO metadata in a Next.js app, which rendering strategy would you pick and why?
  2. 2How would you configure a page to be statically generated at build time versus rendered on each request?
  3. 3What happens if you use getServerSideProps on a page that also has dynamic routes?

2-5 years experience

  1. 1We have a blog where new posts are added frequently. You notice the page load time spikes after a new post is published. Which Next.js rendering strategy would you choose to balance freshness and performance, and how would you implement it?
  2. 2During a rollout, a page that uses getStaticProps started returning 404 after deployment. Walk me through how you'd debug the issue.
  3. 3Explain the trade‑offs between using ISR with a revalidation time of 10 seconds versus using SSR for a dashboard that updates every minute.

5-8 years experience

  1. 1Our e‑commerce site serves millions of product pages. Design a rendering strategy that minimizes server load while keeping product data up‑to‑date within 5 minutes. Discuss caching, ISR, and fallback mechanisms.
  2. 2We need to support personalized content (user’s cart) on a page that is otherwise static. How would you combine static generation with server‑side rendering in Next.js to achieve this without hurting performance?
  3. 3What edge cases can cause stale data when using ISR, and how would you mitigate them at scale?

8+ years experience

  1. 1The company is migrating a legacy monolith to a micro‑frontend architecture using Next.js. How would you decide which parts of the app should use SSR, SSG, or ISR to optimize both developer velocity and runtime cost across teams?
  2. 2Explain how you would set up a CI/CD pipeline that automatically adjusts rendering strategies (e.g., switches a page from SSR to ISR) based on observed traffic patterns and cost metrics.
  3. 3Discuss the long‑term maintenance implications of mixing SSR, SSG, and ISR in a large codebase. How would you enforce consistency and avoid technical debt across multiple squads?

Follow-up Questions

  • Can you walk me through the implementation steps for that choice?
  • What monitoring or metrics would you put in place to verify it works as expected?
  • How would you handle a failure or edge case that breaks the rendering pipeline?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.