Posts

Showing posts from July, 2020

Optimizing .Net Core Web API's

Image
To optimize your web API's first of all you have to set up your branch mark up to what extent you need to optimize and what are your goals. There are several ways to optimize your API in .Net Core. Asynchronous Programming ASP.NET Core API's should be designed to process many requests simultaneously. Asynchronous APIs allow a small pool of threads to handle thousands of concurrent requests by not waiting on blocking calls. Rather than waiting on a long-running synchronous task to complete, the thread can work on another request. A common performance problem in ASP.NET Core API's is blocking calls that could be asynchronous. Many synchronous blocking calls lead to  Thread Pool starvation  and degraded response times. Make  repeatedly using function and heavy code area as  asynchronous. Call data access, I/O, and long-running operations API's asynchronously if an asynchronous API is available for that data retrieval API. Do  not  use  Task.Run  ...