Last post Jul 12, 2016 10:00 AM by deepalgorithm
Jul 11, 2016 02:54 PM|nissan|LINK
I am looking for some websites where I can find the information on the performance difference.
How can the two services handle thousands of requests at a time.
When should I consider using some kind of queuing mechanism.
Jul 11, 2016 07:54 PM|deepalgorithm|LINK
You should opt for Web API in most cases.
Web API is fine if the the round trip in total is not that large, but if you're talking about 10's of thousands of messages then it might become a consideration. Using HTTP messaging is hugely convenient in a number of ways - not the least of which
is the practically instant compatibility with a lot of client systems. If you're in C# you have the HttpClient helper class.
WCF supports HTTP, but it can speak a number of other protocols as well. Regarding performance – I don’t think there is a truly definitive answer here.
There are some narrow use cases where it still might make sense to use WCF, for example - message queuing applications where WCF provides a clean abstraction layer over MSMQ, or inter / intra process applications.
In order to handle thousands of requests at a time - you should horizontally scale and consider at least a basic distributed architecture perhaps using something like Hangfire.
Jul 11, 2016 10:56 PM|nissan|LINK
Thank you for the reply. So with webapi, can we still use MSMQ?
Jul 12, 2016 02:42 AM|Yohann Lu|LINK
As far as I know, the Performance of Webapi and WCF Services are depends on what kind of traffic are you expecting, what kind of functionality would your REST api have, and lots more.
You can refer the following tutorial. They will give you some better perspective.
ASP.NET Frameworks and Raw Throughput Performance:
REST WCF vs. WebAPI (throughput performance):
Jul 12, 2016 10:00 AM|deepalgorithm|LINK
MSMQ has its own api - so yes you can use it with Web API. Though I'd also consider other queuing technologies such as