Hacker News new | ask | show | jobs
by ewjt 1389 days ago
Serverless.

Running an ASP.NET app in AWS Lambda is just a few lines of code. However, all of a sudden startup time becomes important for both performance and cost.

These investments by Microsoft and others[1] allow .NET to remain relevant and viable for modern use cases.

[1] https://github.com/awslabs/dotnet-nativeaot-labs

1 comments

Serverless is great, but if you want to go that route you should be aware that it is in no way a typical hosted ASP.NET app, and while you can "Run an ASP.NET app in AWS Lambda" with little code, there are are better ways to design a Lambda.
Can you elaborate on “is in no way a typical hosted ASP.NET app”?

I get that the machinery under the hood is different (ie. Kestrel web server may not get used). However, we typically don’t care about those details. Our ASP.NET code runs in 3 separate places (containers, servers, Lambda) and the only difference between all 3 is a single entry point file.

Do you mean because Lambda is only serving one request at a time and has a more ephemeral host process lifetime?

> Lambda is only serving one request at a time and has a more ephemeral host process lifetime

Yes, a typical hosted ASP.NET app is neither ephemeral or one request at a time. So this drives different design decisions.