We are migrating a large code base from .Net Framework 4.7.2 ASP.NET to .NET 6 ASP.NET Core (Hosted in IIS 10).
Unfortunately we noticed a regression in high load scenarios. The ASP.NET was able to recover from load peaks, while ASP.NET Core enters thread starvation and only recovers if load is reduced and even then it takes minutes. Due to Oracle not providing a true async API, a large part of our code base runs synchronously.
Our current hypothesis for the difference is the missing default request queue that was present in ASP.NET (?). The naive approach would be to introduce a rate limiting middleware, but hard coding the number of concurrent requests that are allowed seems problematic. Is there a way to configure ASP.NET Core so that it starts to throttle/rate limit the number of requests as it approaches thread starvation?
We assume we would need something like this: https://referencesource.microsoft.com/#System.Web/RequestQueue.cs,8