views:

2331

answers:

4

I am using basic HTTP binding.

Does anybody know which is the best binding in terms of performance as thats the key issue for our site?

+3  A: 

Depends on where the services are located.

If they're on the same machine, NetNamedPipeBinding should give you the maximum performance.

Otherwise you'll have to choose depending on where they are located, if they have to communicate over the internet, interopability etc.

Soledad Pano's blog has a good flow chart to help with choosing the appropriate bindings depending on situation

John Sibly
+4  A: 

This is comparing apples to oranges. If you are using the basic HTTP binding, then there is a basic set of services and whatnot that it is providing, which is different from the services that the WsHttpBinding offers, for example.

Given that, the performance metrics are going to be different, but you also aren't going to get the same functionality, and if you need that particular set of functionality, then the comparison isn't worth doing at all.

Additionally, there are bindings (like the net tcp and named pipe bindings) which might not be applicable at all, but have better performance characteristics.

Finally, your statement about "best performance" indicates that you really aren't looking at it the right way. You have expectations of what your load is during peak and non-peak times, as well as the response times that are acceptable for your product. You need to determine if WCF falls within those parameters, and then work from there, not just say "I'm looking for the best performance".

You will have to give more requirements for what you are trying to do, and then more light can be shed on it.

casperOne
A: 

A good resource for WCF info:

http://www.codeplex.com/WCFSecurity/Wiki/View.aspx?title=Questions%20and%20Answers&referringTitle=Home

Has a section on choosing bindings for your particular scenario. Is security not an issue? If not then you have more choices available to you.

Tanner
A: 

It's hard to tell what the performance will be without other known factors (server HW, amount of concurrent users, etc.).

HTTP binding will be performing slightly better then HTTPS for example, but binary WCF to WCF communication will be quicker then HTTP for the price of lesser compatibility.

I think you need to provide more details - what is the desired functionality (do you need SOAP messages exchange, or Ajax with JSON?) and expected server load.

Jozef Izso