I have two options:
If I self host Wep Api uisng
OWIN/Katana
I can have the performance gain but as mentioned here, I have to write code to have the features ofIIS
like logging, application pool scaling, throttling etc.Instead can I create API using
Asp.Net Core
which doesn't use unnecessarySystem.Web
request pipeline ? And use theIIS
features orNginx
Server features ?
With performance in mind which is the best option ?
Update:
I mean , I don't want to use IIS
, but i want to self host Web API with IIS
features using custom code. or Will Asp .NET Core will help me to achieve this without IIS and unnecessary System.Web request pipeline ?
I recommend option 2 i.e. ASP.NET Core Web API for following reasons
With Kestrel improvements, it beneficial to use ASP.NET Core 2. The Web API can be hosted on IIS/ Nginx or stand alone pretty easily.
I'd go with using dotnet core as well. As there will be ongoing improvement for the middlewares and Nuget packages thanks to the open source community. Being cross platform could be another plus .
Additionally, dot net core got decent performance and the middleware pipeline is flexible enough to say it could pretty much cover the self hosted flexibility features.