Monday, September 30, 2013

WCF Load Balancing – basicHttpBinding

To enable WCF service to take advantage of Load balancing with basicHttpBinding easily it needs to set keepAliveEnabled property of binding to false when there is connection reuse. When this property is enabled, will lead a client to maintain a persistent connection with the service which helps for performance side of view as the connection reuses with multiple messages. Ideally in a load balanced cluster the purpose is to avoid having sticky sessions and strongly associated a client with a server, a simple solution is utilizing the following configuration for custom binding:

<customBinding> <binding name="CustomHttpBindingConfig" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00"> <textMessageEncoding /> <httpTransport keepAliveEnabled="false" /> </binding> </customBinding>


Another approach to apply necessary changes through the code discussed before in “WCF service under Network Load Balancing (NLB)” blog entry.

Share/Bookmark

No comments: