Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

ASP.NET Core WebAPI much slower than WCF?

$
0
0

 Hi,

While researching for a new project for a application service, I thought that .NET Core was the way to go. However, it seems that it's much slower compared to services developed in WCF. Any thought on this?

What I did was that I first created a WCF service, which returned a very simple contract, User, with three properties. When hosting this locally in IIS Express, or in Azure VM, I got an average response time of 33ms, which is expected.

After that I ported the same service into a new ASP.NET Core 2.0 WebAPI project, returning the same type of object. To my surprise, the average response time of this service is 144ms, over 4 times slower! Here I hosted it both locally in IIS Express, Kestrel as well as in Azure (Docker).

I used SoapUI for load testing. But I also used Postman and WPF clients with the same result. Also note that the WCF service used basicHttpBinding to eliminate the protocol difference.

Lastly I created a new project from scratch again with ASP.NET Core 2.0 WebApi and executed the template "values" service. This too has an overhead of 100ms+.

Can anyone explain why it performs so bad compared to WCF? It seems to be an overhead somewhere, is it MVC? This is a big concern since performance is crucial, and I expected at least the same performance as in WCF.

/Staffan


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>