Software Services
For Companies
Products
Build AI Agents
Security
Portfolio
Build With Us
Build With Us
Get Senior Engineers Straight To Your Inbox

Every month we send out our top new engineers in our network who are looking for work, be the first to get informed when top engineers become available

At Slashdev, we connect top-tier software engineers with innovative companies. Our network includes the most talented developers worldwide, carefully vetted to ensure exceptional quality and reliability.
Build With Us
Scaling Next.js: SSG, ISR, RSC, Serverless and Edge/

Choosing the Right Next.js Architecture for Scale
Selecting SSG, ISR, RSC, or serverless isn’t a purity test; it’s a portfolio decision aligned to revenue, freshness, and personalization. At enterprise scale, you often run all four in one codebase, mapped to routes by business intent rather than developer preference.
Start with a ruthless routing taxonomy
Classify every route by two axes: update frequency and user specificity. High-frequency + user-specific (dashboards, carts) want RSC and server actions on serverless or edge. Low-frequency + generic (campaign landers, docs) belong to SSG. Everything in between is ISR with explicit revalidation. Codify this in your /app structure using segment configs and caching headers.
When SSG wins
Use SSG for evergreen SEO pages, product education, and PR. Pre-render at build, ship zero runtime data fetching, and lean on asset CDNs. Pair SSG with image optimization, font subsetting, and route-level prefetch to push Core Web Vitals into the green. For Mobile UI performance optimization, eliminate client JS on these routes via RSC-only components and shared layouts without use client.

ISR for dynamic catalog and editorial
ISR shines when content changes often but not per-user. Example: a retailer’s category pages that update hourly. Use revalidateTag hooks from your CMS webhooks, not fixed seconds, so cache busts are business-driven. For spikes, enable on-demand revalidation per SKU to keep long-tail pages hot during campaigns.
RSC for personalization and data gravity
React Server Components reduce client JavaScript, improving time-to-interaction on low-end devices. Put authentication, pricing, and entitlement logic into server components and stream HTML. Co-locate queries with components on the server, paginate aggressively, and memoize expensive calls with stable cache keys. Client components become islands for truly interactive widgets, keeping payloads slim.

Serverless and edge placement
Use serverless for APIs with variable load, and edge for ultra-low-latency personalization gates and A/B assignment. Keep edge logic stateless and tiny; push heavy lifting back to regional serverless or databases with read replicas. For compliance, pin sensitive routes to specific regions and disable caching by default on authenticated paths.
Case patterns that scale
- Global marketing site: SSG for country landing pages; ISR for newsroom; edge middleware for locale detection; zero client JS on hero routes.
- B2B SaaS: RSC for dashboard queries with streaming; serverless for exports; client components only for charts needing WebGL.
- E-commerce: ISR for PLPs with tag-based revalidation; RSC cart and pricing; serverless checkout; edge for experiment assignment.
- Marketplace: SSG category hubs; ISR vendor profiles; RSC inbox; serverless search with incremental indexing.
Data contracts beat hope
Version your API responses and cache keys. In ISR, include a contentRevision in tags so revalidateTag(‘product-123@42’) invalidates precisely. For RSC, use stable identifiers in fetch cache and set cache: force-cache or no-store deliberately; don’t rely on defaults. Document TTLs per route in the repo so marketing and SEO teams know when changes appear.

Performance levers that matter on mobile
- Ship less JS: prefer RSC, split client components by route segment, and avoid client context for global state.
- Fonts: subset, preconnect, and use display: swap; self-host to avoid FOIT on flaky networks.
- Images: next/image with AVIF, explicit sizes, and stable aspect ratios to kill CLS.
- Prefetch: use viewport-based prefetch sparingly; respect user-data-saver.
- Animations: prefer CSS over JS; offload heavy work to GPU-friendly properties.
Working models and governance
Nearshore software development companies integrate well with this architecture if you partition ownership by route types. Fixed-scope web development projects can deliver the SSG/ISR layer and shared design system first, then layer RSC and serverless independently. Guardrails: a routing charter, a caching matrix, and automated CI checks that block client components on SSG routes.
Staffing and partners
You don’t need a huge team; you need the right muscle. Platform engineers define deployment topology and observability. Feature teams own route folders, not services. If you need velocity, slashdev.io can supply senior Next.js engineers and pragmatic leads who’ve shipped at scale, blending staff augmentation with software agency rigor.
Migration path without drama
Start by moving read-mostly pages to SSG to harvest instant SEO and performance gains. Introduce ISR for content surfaces tied to CMS events. Carve out high-churn, per-user areas into the app router with RSC and server actions, while leaving legacy pages/routes operational. Measure each step against real KPIs: LCP p75, error rates, cache hit ratios, and conversion lift.
Checklist before you ship
- Every route labeled SSG, ISR, or RSC with TTL and cache policy.
- Edge only for latency-critical decisions.
- No client JS on informational pages.
- Revalidation triggered by business events, not guesswork timers.
- Observability: route metrics, cold-start tracking, cache analytics.
