Why I Still Run My Backend on .NET While Everyone Else Moves to TypeScript and Rust
If you only read tech Twitter, Hacker News and conference schedules, you’d think backend development has split into two camps. One writes everything in TypeScript, frontend to database, on Node, Bun or Deno. The other is rewriting the hot paths in Rust and posting the benchmark charts. .NET barely gets a mention.
I spend my working day in TypeScript. I lead frontend engineering, I like the language, and I’d choose it again for any UI I build. But when I built the LibreSharp SaaS Starter, I put the backend on .NET without much hesitation. This post explains why, and where I think the TypeScript and Rust crowds have a point.
The Argument for Moving
Both arguments are good ones, so it’s worth stating them properly.
The TypeScript case is about having one language everywhere. You get one toolchain, one set of conventions and one hiring pool, and types can flow from the database schema to the React component without a translation step. Frameworks like Next.js and React Router blur the line between frontend and backend so much that a separate API project can feel old-fashioned. For a small team, that’s a real productivity gain.
The Rust case is about performance and correctness. There’s no garbage collector, memory use is tiny, start-up is fast, and a compiler rules out whole classes of bugs before the code ever runs. If you’re paying for compute by the millisecond, or building infrastructure that other people’s software sits on, Rust is hard to beat.
I agree with all of that. I just don’t think either argument fits the kind of software I mostly build: business applications and SaaS products, where most of the code is about accounts, permissions, billing, workflows and data that has to stay correct for years.
What a SaaS Backend Actually Needs
Strip away the hype and the backend of a typical SaaS product has to do a fairly boring list of things well:
- Authentication, with passwords, social sign-in, passkeys, lockout and token refresh
- Authorisation across organisations and roles
- A relational database with migrations and transactions
- Background jobs, scheduled work and retries
- Reliable messaging, so that a Stripe webhook or a welcome email isn’t lost when something restarts
- Observability, so you can find out why it broke at 3am
- Tests that run against a real database
Runtime speed is rarely what limits a product like this. What limits it is how quickly a small team can build that list correctly, and then keep it working for five years while the people and requirements change. That’s where I think .NET is at its strongest.
Why .NET Fits
The boring parts come in the box
ASP.NET Core includes things that TypeScript backends usually assemble from separate packages. Identity, data protection, rate limiting, health checks, OpenAPI, output caching, dependency injection, configuration and structured logging all ship with the framework, from the same team, on the same release schedule.
In a Node backend, each of those is a separate library with its own maintainer, its own release cadence and its own chance of being abandoned. I’ve written before about how much package management shapes the JavaScript experience. A typical .NET backend has a much shorter dependency list, and most of what’s on it comes from Microsoft or a few well-established projects. When you’re responsible for security, a shorter list is a real advantage.
Durable messaging without extra infrastructure
The thing that tipped the starter towards .NET was WolverineFX and Marten. Together they give you a transactional outbox, durable local queues, scheduled messages and event sourcing, all stored in the same PostgreSQL database as your application data. A Stripe webhook is written to a queue inside the same transaction that records it, so a crash halfway through doesn’t lose the event. You don’t need Redis, RabbitMQ or Kafka, so there’s one less service to run and pay for.
You can build the same thing in TypeScript, but you’ll be assembling it yourself from a queue library, an ORM and your own outbox code. In .NET it’s a NuGet package and a few lines of configuration. I compared the options in an earlier post.
Fast enough that it never comes up
People who left .NET in the Framework days tend to remember it as heavy. Modern .NET is one of the fastest mainstream web runtimes and regularly sits near the top of the TechEmpower benchmarks. It has real multithreading, so a CPU-heavy request doesn’t stall every other request the way it can on a single Node event loop. A small SaaS app runs comfortably in a few hundred megabytes of RAM on a cheap VPS. Native AOT and trimming now cover the cases where start-up time or image size matter.
Rust will beat it on raw speed and memory, and that’s fine. For a SaaS backend, the difference rarely shows up on the bill or in the user’s experience. The database round trip is almost always the slow part, and it’s just as slow whichever language is waiting on it.
One strong type system end to end, without one language
The best argument for full-stack TypeScript is shared types. I get most of that benefit without sharing a language. The starter generates its TypeScript API client from the backend’s OpenAPI spec, so when I rename a field in C#, the frontend build breaks in exactly the places that need to change. The contract comes from the code that serves the API, which is arguably safer than a shared types package that both sides import and trust.
C# is also a nice language to write in. Records, pattern matching, nullable reference types and primary constructors have removed most of the verbosity people still associate with it. It feels much closer to modern TypeScript than to the Java-style C# of fifteen years ago.
Predictable releases and long support
.NET ships a major version every November, alternating between standard and long-term support releases. You know when upgrades are coming, what the support window is and how long you have to move. Upgrades between recent versions are usually uneventful. For a product I expect to maintain for years, that predictability matters more than any one feature.
It suits AI-assisted development
This one is newer, but it’s become one of my strongest reasons. AI coding assistants work best when a compiler tells them they’re wrong. A statically typed language with a strict compiler, a fast test suite and clear conventions gives an agent tight feedback loops. It writes code, the build fails, it reads the error and it fixes the code, often without a human stepping in. C# with nullable checks turned on is a good fit for that. So is Rust, to be fair, and TypeScript in strict mode gets close. Plain JavaScript and loosely typed code are where agents struggle most.
Where I’d Choose Something Else
I’m not claiming .NET is always the right answer.
I’d choose TypeScript for the backend when the team is frontend-heavy and nobody wants to learn C#. The same goes for a product that is mostly a UI over third-party APIs, with little business logic of its own, or something built around edge functions that runs close to the user. If the backend is thin, a second language isn’t worth the overhead.
I’d choose Rust for anything where performance or resource use is the product: proxies, databases, game servers, high-volume data pipelines, embedded and systems code, or a service on a hot path that runs on thousands of machines. I’d also reach for it when a small part of a .NET system needs to be faster, rather than rewriting the whole thing.
I’d also be honest about the weak spots in .NET. The open source ecosystem has had a rough couple of years, with several popular libraries going commercial. It’s the reason I built LibreSharp, and it’s a fair reason for people to be wary. The community is also smaller and more corporate than JavaScript’s, so you’ll find fewer tutorials for niche topics. And Microsoft’s history still puts some developers off, even though the modern platform is open source and runs happily on Linux.
The Industry Isn’t Really Leaving
The “everyone is moving” story mostly comes from the parts of the industry that blog and post the most: start-ups, developer tool companies and open source projects. A huge amount of software in banks, insurers, government, healthcare and logistics runs on .NET, and very little of it is being rewritten. The developers maintaining it just don’t tend to write viral posts about it.
Trends in what people talk about and trends in what people run aren’t the same thing. I’d rather pick a stack because it fits the problem than because it’s what the conference talks are about this year.
So my rule is TypeScript for the frontend, .NET for the backend, and Rust for the few places where speed really matters. It’s not exciting, but it’s let me build a SaaS backend with a transactional outbox, event sourcing, background jobs and full observability. It runs on a single cheap server with one database, and I expect to keep maintaining it for years.
On Friday I’ll cover exactly how cheap that server can be, with a comparison of hosting options for the SaaS Starter.
Loading comments from Disqus…