by isanudelhi · 9mo ago · 0 comments
Here is exactly why we made the switch, and what the numbers look like on the other side.
The Core Signal:
Waiting on Turbopack: Our initial local route loads took 10 to 12 seconds under the full weight of the App Router and RSCs. Switching to a Vite-based runner dropped that to 2 seconds, completely changing the momentum and mood in our Slack channels.
Production memory leaks: We watched Next.js processes climb to 9GB locally and repeatedly OOMKilled our Kubernetes pods in production. Moving to TanStack’s explicit Node architecture eliminated these opaque router cache memory leaks entirely.
The RSC security tax: The recent React2Shell (CVSS 10.0) vulnerability proved that implicit Server Components turn your UI protocol into a security-critical transport. We wanted explicit JSON boundaries back, not a massive new attack surface to patch.
The multi-cloud ceiling: Next.js heavily incentivizes Vercel's edge network, which scales unpredictably for our workloads. Compiling to a standard Node build unlocks standard container hosting, saving us thousands in infrastructure costs.
The Contrarian Take: The industry insists that compiler magic and implicit server boundaries are the only way forward for React. We disagree.
For highly interactive SaaS applications, predictability beats abstraction every time. Explicit route loaders and strict TypeScript boundaries prevent the exact classes of runtime bugs that implicit frameworks tend to push into production. We traded the magic for explicitness, and the code is simply easier to reason about.
The Migration Playbook: We didn't pause our product roadmap for a massive, six-month rewrite. We used a phased, strangler-fig approach—putting an Nginx proxy in front and moving our highest-friction dashboards first. It wasn't perfectly smooth, and Vite SSR definitely has its quirks.
Read the exact migration playbook, our hard metrics, and the trade-offs we hit →
> Waiting on Turbopack: Our initial local route loads took 10 to 12 seconds under the full weight of the App Router and RSCs.
Out of curiosity, were you on Next 16.0 or 16.1? We shipped file system caching in 16.1 that greatly improves the initial route loads. https://nextjs.org/blog/next-16-1#turbopack-file-system-cach...
> Production memory leaks
If anyone else runs into this, we've got a guide on how to profile your application: https://nextjs.org/docs/app/guides/memory-usage
> The multi-cloud ceiling
Admittedly hosting Next.js can be a bit harder than a SPA if you're using all the features of the framework, but if you're scaling and you don't want to use Vercel, you've got a lot of other options, including those provided by OpenNext. We've got a nice example repository here: https://github.com/leerob/next-self-host