I am currently using a custom binding in 4.0 to perform binary encoding over http but its performance is still far off our NetTCPBinding.
I see there is a new NetHttpBinding for use in environments where both the clients and server are .Net based. Is this simply the NetHttpBinding sample that was included in .Net 4.0? Or are there any other performance improvements in it, beyond Binary
Encoding?
By default, if you use NetHttpBinding with a duplex contract it will actually use WebSockets (this only works on Windows 8). If you use it with a normal request-reply contract you'll get the equivalent of BasicHttpBinding with a binary encoder. You can override
this behavior if you want to use WebSockets even for request-reply contracts (there is potential for a performance gain here).
It sounds like you aren't working with duplex contracts and you will probably find that NetHttpBinding is equivalent to your custom binding unless you have the opportunity to get both endpoints upgraded to run on Windows 8 and use WebSockets.
</div>
Marked as answer by rjguis on Oct 24, 2011 06:18 AM
rjguis
Member
3 Points
2 Posts
New NetHttpBinding in 4.5
Oct 23, 2011 10:20 AM|LINK
I am currently using a custom binding in 4.0 to perform binary encoding over http but its performance is still far off our NetTCPBinding.
I see there is a new NetHttpBinding for use in environments where both the clients and server are .Net based. Is this simply the NetHttpBinding sample that was included in .Net 4.0? Or are there any other performance improvements in it, beyond Binary Encoding?
Thanks
Rich
Paul Batum
Member
46 Points
8 Posts
Re: New NetHttpBinding in 4.5
Oct 23, 2011 11:42 AM|LINK
By default, if you use NetHttpBinding with a duplex contract it will actually use WebSockets (this only works on Windows 8). If you use it with a normal request-reply contract you'll get the equivalent of BasicHttpBinding with a binary encoder. You can override this behavior if you want to use WebSockets even for request-reply contracts (there is potential for a performance gain here).
It sounds like you aren't working with duplex contracts and you will probably find that NetHttpBinding is equivalent to your custom binding unless you have the opportunity to get both endpoints upgraded to run on Windows 8 and use WebSockets.
</div>rjguis
Member
3 Points
2 Posts
Re: New NetHttpBinding in 4.5
Oct 23, 2011 12:38 PM|LINK
Thanks.