Share via


Configure WCF and WF for Server, Site, Application, or Virtual Directory: Throttling Tab

Use this tab to configure default service throttling settings at the server, site, and application levels.

To configure default service throttling settings at the server level, select server name, click Configure in the Actions pane to launch the Configure WCF and WF for Server dialog box, and then switch to the Throttling tab in the dialog box. Similarly, to configure default service throttling settings at the site level and application level, select site name or virtual application name, click Configure in the Actions pane to launch the Configure WCF and WF for Site dialog box or Configure WCF and WF for Application dialog box, and then switch to the Throttling tab in the dialog box.

You can also launch the Configure WCF and WF dialog box at the server, site, and application scopes by performing the following steps:

  1. Right-click the server, site, or application node in the tree view of the IIS Manager.

  2. Point to .NET 4 WCF and WF and then click Configure.

Dialog Fields

Field

Description

Maximum Concurrent Calls

Specify the limit on number of messages that a service host can process at a time. If the number of calls being processed is equal to this value, any new calls are queued until one of the active calls completes. The allowed values for this parameter range from 0 to Int32.MaxValue. Setting this parameter to 0 is equivalent to setting it to Int32.MaxValue. The default value is 16 * number of processors in the computer.

Maximum Concurrent Instances

Specify the maximum number of InstanceContext objects in the service. It is important to keep in mind the relationship between the MaxConcurrentInstances property and the InstanceContextMode property. If InstanceContextMode is PerSession, the resulting value is the total number of sessions. If InstanceContextMode is PerCall, the resulting value is the number of concurrent calls. If a message arrives while the maximum number of InstanceContext objects already exist, the message is held until an InstanceContext object closes. The allowed values for this parameter range from 1 to Int32.MaxValue. The default value is Maximum Concurrent Calls + Maximum Concurrent Sessions.

Maximum Concurrent Sessions

Specify the limit on number of sessions that a service host can accept. The service host will accept connections in excess of the limit, but only the channels below the limit are active (messages are read from the channel). The allowed values for this parameter range from 0 to Int32.MaxValue. Setting this value to 0 is equivalent to setting it to Int32.MaxValue. The default value is 100 * number of processors in the computer.

The fields in the Throttling tab correspond to maxConcurrentCalls, maxConcurrentInstances and maxConcurrentSessions attributes on the serviceThrottling element. In the following sample configuration, the serviceThrottling element in the behavior element associated with the service s1 configures service throttling settings for the service s1.

<system.serviceModel>
    <services>
        <service name="s1" behaviorConfiguration="sampleBehavior"/>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="sampleBehavior">
                <serviceThrottling
                    maxConcurrentCalls="17"
                    maxConcurrentInstances="27"
                    maxConcurrentSessions="11" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
</system.serviceModel>

The Throttling tab internally uses the Get-ASAppServiceThrottling and Set-ASAppServiceThrottling cmdlets to get and set values of throttling parameters.