WCF NetTCP Binding Over Internet

后端 未结 3 1906
耶瑟儿~
耶瑟儿~ 2021-01-12 11:43

I have a question. I would like to serve a series of services made with WCF. The client that consumes the services is also .NET with WCF. I would like to have high speed of

相关标签:
3条回答
  • 2021-01-12 11:49

    According to your scenario, NetTcpBinding is the binding of choice. As you are sure that client will be WCF, no need for interoperability.

    Have a look here in Programing WCF Services book.

    The only thing I'm not sure about is firewalls. If you have to get trough on of theses, maybe some WS binding could be more appropriate.

    0 讨论(0)
  • 2021-01-12 12:05

    There is a good article on choosing a binding by Juval Lowy here:

    http://www.code-magazine.com/article.aspx?quickid=0605051&page=3

    Generally the advice is not to use net tcp binding over the internet. Have not heard of anyone doing it. Although it may work if the ports are open all the way and no one blocks the calls.

    Test it with nettcp, if it does not work you just need to change the configuration.

    The most important thing is to consider your security needs. Do you just need point to point, then basichttp over ssl. Do you need end to end, then wshttp with message encryption.

    0 讨论(0)
  • 2021-01-12 12:06

    Since you plan to use simple types and small data contracts, the binding you use is nearly irrelevant compared to the latency introduced by going over the Internet. So, the right answer is to use the one which is easiest to manage and the most secure.

    I recommend that you host the app in IIS and use a wsHttpBinding and take all the manageability goodness that goes along with it. It will also happen to be interoperable, and while that is irrelevant today, it is just free, so why not?

    And, please consider the granularity of your service. You know your customers better, but on the wide open Internet, stuff happens. Because the round trip time over the Internet is variable and impossible to control, it could take milliseconds or seconds or may not get there at all. So, you should take fewer trips with larger payloads if possible, and use all sorts of caching and async operations to make the app appear "fast".

    0 讨论(0)
提交回复
热议问题