Tuning throttle parameters of WCF

WCF offers significant performance results compared to the other existing distributed technologies such as ASMX and WSE. In terms of throughput, i.e. number of transactions per second, WCF is 25-50% faster than traditional ASP.NET Web Services. A detailed study on performance comparisons of WCF with existing distributed communication technologies can be found at

 

https://msdn2.microsoft.com/en-us/library/bb310550.aspx

 

 

To achieve the best performance oriented results, one has to fine tune throttle parameters as per the requirements of the applications. The default values of the throttle parameters are slightly on the lower side and you need to scale the values up as per the needs of your application and for better performance. Defining the optimum values of the throttle parameters can significantly increase the performance. The throttle parameters include MaxConcurrentCalls, MaxConcurrentSessions and MaxConcurrentInstances. MaxConcurrentCalls specifies the number of active messages being processed across the service host object and its default value is 16. MaxConcurrentSessions indicates maximum number of concurrent users/connections WCF can handle provided it has enough resources. If the number of client machines accessing the WCF service exceed the specified no. of MaxConcurrentSessions they get queued up until the free session are available. The default value of MaxConcurrentSessions is 10. MaxConcurrentInstances specifies the number of service objects each service can have.

 

High throughput can be achieved by keeping the values of throttle parameters as low as possible, however the low values can affect the number of users accessing the web service. For an application that needs to handle high number of concurrent users, setting the higher value for MaxConcurrentSessions can benefit at the cost of higher response time. To decide the optimum values for the throttle parameters for a particular application, one has to test it at different numbers.