Question

My biggest concern is performance on my WCF and I know that using wshttpbinding is much slower than basichttpbinding but it is more secure since messages are encrypted.

But when I do speed performance test, there is a significant performance difference.

My responses are sometimes up to 1 mb. So my question is that, is basichttpbinding is the way to go when I need performance but not security?

I am using anyway https, so it is also secure connection, or is there anyway I can optimize the performance and reach the basichttpbinding speed by using wshttpbiding?

Thank you for your answers

Was it helpful?

Solution 2

wsHttpBinding implements WS-Security stack. This stack add security on your message, but have slow performances.

You can use a TLS channel with a client and a server certificate. You will have the same level of security as WS-Security (Authentication, Authorization, Confienditiality, and non repudiation).

I generally use customBindings, instead of basicHttpBinding or wsHttpBinding. Is is more configurable. You can convert bascHttpBinding to custom bindings with this tool : http://webservices20.cloudapp.net/.

basicHttpBinding is like a customBinding, but with predifined values, like SOAP11 for the message version.

OTHER TIPS

In the process of designing your WCF service, you need to determine, based on the system requirements, if the security benefits of wsHttpBinding outweigh the performance cost. If your requirements indicate a need for security beyond SSL, then you need to implement wsHttpBinding. If on the other hand, SSL is sufficient for your security needs, then you may want to select basicHttpBinding to reduce the overhead.

Note: If your web service traffic is routed through intermediaries (e.g. a WCF Routing Service) then your SSL session will be terminated and reestablished, so your message traffic will be “in the clear” to the intermediate/proxy system. In that scenario, you can leverage wsHttpBinding (WS-Security) to ensure the message is encrypted from end-to-end.

Additional information: BasichttpBinding vs WSHttpBinding of WCF

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top