Our services

If you can think it, we can make it brainsoft.

When server-side rendering is worth the complexity

Written By: BrainSoft In Frontend

Every few projects someone asks whether we should render on the server. Usually the question arrives after a client sees a slow first paint on a dashboard, or after a marketing page fails a Core Web Vitals check. The honest answer is that SSR is a tool with a narrow set of jobs, and adding it turns a static build into a running service you have to deploy, monitor and scale.

SSR is worth it when the first paint depends on per-request data, when crawlers or link previews need real HTML, or when the client device is weak. If your pages are the same for everyone and load fast, skip it and keep your static hosting.

The cases where it pays off

Start with the user-visible problem. If the page shows a spinner for two seconds before anything meaningful appears, and that content comes from an API call the browser makes after the bundle loads, SSR removes a full round trip. The server already has the data or can fetch it in the same request, so the HTML arrives complete.

  • Personalised pages where the above-the-fold content depends on the logged-in user, their locale or their permissions.
  • Content that must be indexable or shareable, like product pages, articles or public profiles, where social crawlers do not run JavaScript.
  • Slow devices and poor networks, where shipping less JavaScript and doing the first render on a server is a measurable win.
  • Pages that combine public and private data in one view, where a client-only approach means two loading states stacked on top of each other.

Notice what is not on that list: "we use React" or "it feels modern". Those are not reasons. A static site with a small island of interactivity handles a surprising number of cases, and it costs almost nothing to host.

What you actually take on

The complexity is real and it shows up in operations, not in the first week of coding. A static build is files on a CDN. An SSR app is a process that needs a runtime, health checks, logs, and a plan for what happens when it falls over.

  • Every render now touches your data layer. A slow database query becomes a slow page for every visitor, not just the one who triggered it.
  • You need caching. Without it, a traffic spike hits your API as hard as it hits your web server.
  • Hydration mismatches appear when the server and client disagree about time, random values or browser-only APIs.
  • Local development gets heavier, and debugging now spans two runtimes.

A common middle ground is to render the shell and the critical content on the server, then let the client take over. In a Next.js app that is often just a matter of being deliberate about which components fetch data:

// runs on the server, result is cached per request
export default async function Page({ params }) {
  const product = await getProduct(params.id);
  return <ProductView product={product} />;
}

If your team has never run a Node service in production, that is the real cost. It is not the rendering code. It is the on-call rotation, the memory limits and the deploy pipeline. We often help teams work through that side of it as part of our services, because it decides whether the project ships on time.

How to decide without guessing

Measure before you commit. Open the page on a throttled connection, watch the network panel, and write down when the first meaningful content appears. If that number is acceptable, you are done. If it is not, find out why before reaching for SSR.

Then ask three questions. Does the content differ per request? Do crawlers or link previews need it? Can the client render it fast enough on the devices your users actually hold? Two or more yes answers point toward SSR. One or zero point toward static generation, incremental static regeneration or a small API the client calls.

It also helps to pick a framework that lets you mix modes per route rather than committing the whole app. Next.js, Nuxt and SvelteKit all let you choose static, server-rendered or client-rendered page by page. That keeps the operational surface small and lets you add SSR where it earns its keep.

Frequently asked questions

Is SSR always faster than client-side rendering?

No. It improves time to first meaningful paint when the content depends on data the server can fetch quickly. If your API is slow or your cache misses often, SSR can be slower than serving a static file and letting the client fetch data in parallel.

Do I need SSR for SEO?

Only if the content is not in the initial HTML. Google renders JavaScript, but many social and messaging crawlers do not. For public pages that get shared, static generation usually gives you the same benefit with far less to operate.

Can I add SSR later if I start static?

Yes, if you pick a framework that supports both. Adding it later is mostly a deployment change: you introduce a server runtime and move the routes that need per-request data. Starting static keeps the early work simple and leaves the door open. If you want a second opinion on your setup, get in touch.


#Frontend