My SignalR app now starts in 180ms โ thanks to a 25MB AOT binary.
I replaced the .NET runtime with a 25MB SignalR binary and dropped cold starts to 180ms. โก
Turns out, Native AOT in .NET 9 isnโt just for console apps anymore.
Most real-time .NET apps ship bloated containers, thinking SignalR needs the full runtime.
Thatโs what we believedโฆ until customer complaints started piling up.
Our SignalR-based Azure Functions were slow.
Startup took 2.3s, memory use hit 150MB, and image sizes ballooned to 180MB.
Deployments were clean, but performance was painful.
Then we tried trimming + Native AOT + minimal API hosting.
The result? A single 25MB self-contained binary, 45MB RAM usage, 180ms startup.
Cold starts in our Azure Functions dropped significantly, and image sizes shrank by 85%.
Native AOT is a game-changer for real-time .NET apps.
๐ญ Are you still shipping full .NET runtimes for SignalR apps โ or have you tried going fully native?
Top comments (1)
Nice article. Iโm not using signalR for now in my personal project but I really want to try using AOT with minimal APIs for lambdas functions.