Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance concern on WCF service vs MVC WebAPI

I am planning to build a web service for providing JSON/XML data to client via HTTP. And I am planning to make it RESTful, but this is only a best-to-have option rather than a must. And normally, I will host it in IIS.

To achieve this, by my analysis, I have 3 options (I need to use MS technologies): WCF service, WCF Data Service and MVC4 WebAPI. I still have one more question before making the final decision. Yes, there are a lot discussions on web talking when to choose one of them, but they focus on other topics such as Protocol, easy to implement, leverage HTTP etc etc.

However, my focus is on the other aspect: from performance aspect, what is the best one (suppose I correctly use them) from the 3 options (to provide JSON/XML via HTTP)?

like image 667
Shuping Avatar asked Nov 14 '12 09:11

Shuping


1 Answers

Frankly there is no definitive answer to your question, it all depends on what kind of traffic are you expecting (or wanting to serve), what kind of functionality would your REST api have (which also impacts performance), and lots more.

Rick Stahl has created a nice blogpost about this. http://www.west-wind.com/weblog/posts/2012/Sep/04/ASPNET-Frameworks-and-Raw-Throughput-Performance

Its not the final answer to your question (namely what is the best). But it should give you some better perspective and hopefully a better position to answer your question.

like image 156
Danthar Avatar answered Nov 16 '22 02:11

Danthar