WCF Keep Alive: Whether to disable keepAliveEnabled
Posted
by
Lijo
on Programmers
See other posts from Programmers
or by Lijo
Published on 2013-03-15T14:27:10Z
Indexed on
2013/11/11
4:12 UTC
Read the original article
Hit count: 324
I have a WCF web service hosted in a load balanced environment. I do not need any WCF session related functionality in the service.
QUESTION
What are the scenarios in which performances will be best if
keepAliveEnabled = false
keepAliveEnabled = true
Reference
From Load Balancing
By default, the BasicHttpBinding sends a connection HTTP header in messages with a Keep-Alive value, which enables clients to establish persistent connections to the services that support them. This configuration offers enhanced throughput because previously established connections can be reused to send subsequent messages to the same server. However, connection reuse may cause clients to become strongly associated to a specific server within the load-balanced farm, which reduces the effectiveness of round-robin load balancing. If this behavior is undesirable, HTTP Keep-Alive can be disabled on the server using the KeepAliveEnabled property with a CustomBinding or user-defined Binding.
© Programmers or respective owner