DEV Community

Supraja Tangella
Supraja Tangella

Posted on

๐—ฆ๐—ถ๐—ด๐—ป๐—ฎ๐—น๐—ฅ ๐˜€๐˜‚๐—ฝ๐—ฝ๐—ผ๐—ฟ๐˜๐˜€ ๐˜๐—ฟ๐—ถ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—ฎ๐—ป๐—ฑ ๐—ก๐—ฎ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—”๐—ข๐—ง

 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?

DotNet #SignalR #NativeAOT #Developers #SoftwareDeveloper #Performance #CloudComputing #TechTips #Programming #WebDevelopment

Top comments (1)

Collapse
 
andersonvnieves profile image
Anderson Nieves

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.