WCF - Selecting appropriate binding

I recently started working on a SOA project, and thought it would be a good idea to brush up on my WCF understanding. and I came across this article WCF Service Binding explained. I never really understood how to use the different bindings available, and I always tended to choose basicHttpBinding or wsHttpBinding as they most closely resembled what I used to know as web services. however,

Thumb rules in choosing endpoint' binding

If you require your service to be consumed by clients compatible with SOAP 1.1, use basicHttpBinding for interoperability
If you require your service to be consumed within the corporate network, use netTCPBinding for performance
If you require your service to be consumed over the internet and the client is a WCF compatible, use wsHttpBinding to reap full benefits of WS* specifications
If you require your service to be accessible only in the same machine, use netNamedPipeBinding
If you require your service to be queue messages, use netMsmqBinding
If you require your service to act as server as well as client in a peer to peer environment, utilise netPeerTcpBinding setting


Of particular interest is netTCPBinding, if you are creating a set of services which are only going to be consumed within your own application, then use netTCPBinding for performance. The problem with this approach is you must use WAS (create a windows service) which then means if you limit your options slightly (I am a web developer so I believe it all begins and ends with IIS) so here is a guide to using this binding with IIS

Comments

Popular posts from this blog

What good looks like!!

A microservice journey - part 2: what type of micro service are you?

Validation Rules