Jaa


Configure Throttling Using AppFabric Cmdlets

This topic describes how to get or set values for throttling parameters by using AppFabric cmdlets.

Note

To execute an AppFabric cmdlet interactively, you will need to use the Windows PowerShell console for Microsoft AppFabric 1.1 for Windows Server, enter the appropriate cmdlet, and then press ENTER. For more information about executing AppFabric cmdlets in general, see Running AppFabric Cmdlets.

To get throttling settings by using cmdlets

In the AppFabric Windows PowerShell console, execute the Get-ASAppServiceThrottling cmdlet to get values for the throttling parameters. This cmdlet retrieves the values of the maxConcurrentCalls, maxConcurrentSessions, and maxConcurrentInstances attributes of the serviceThrottling element from the configuration file associated with the scope specified by the scope parameters.

The following list shows different syntaxes that can be used with this cmdlet. For detailed information about scope parameters (-SiteName, -VirtualPath, -Uri, and so on), see Cmdlet Scope and for detailed information about piping parameters (ApplicationInfo and ServiceInfo), see Cmdlet Piping.

Syntax options for the Get-ASAppServiceThrottling cmdlet

// to get throttling settings at the root level
Get-ASAppServiceThrottling -Root

//sample output from the command
MaxConcurrentCalls       : 16
MaxConcurrentInstances   : 26
MaxConcurrentSessions    : 10
IsLocal                  : True
BehaviorName             : 

// to get throttling settings at the site level
Get-ASAppServiceThrottling [-SiteName] <String> 

// to get throttling settings at an application or a service level that the virtual path points to
Get-ASAppServiceThrottling [-SiteName] <String> [-VirtualPath] <String>] 

// to get throttling settings at a site, application, or service level that an URI points to
Get-ASAppServiceThrottling [-Uri] <Uri> 

// to get throttling settings at an application level specified by the ApplicationObject; used mainly in piping scenarios
Get-ASAppServiceThrottling -ApplicationObject 
Ex: Get-Application <use scope parameters SiteName or Uri to resolve to a Web site> | Get-ASAppServiceThrottling

// to get throttling settings at a service level specified by the ServiceObject; used mainly in piping scenarios
Get-ASAppServiceThrottling -ServiceObject 
Ex: Get-ApplicationService <use scope parameters VirtualPath or Uri to resolve to an application> | Get-ASAppServiceThrottling

To set throttling settings by using cmdlets

In the AppFabric Windows PowerShell console, execute the Set-ASAppServiceThrottling cmdlet to set values for the throttling parameters. This cmdlet sets the values of the maxConcurrentCalls, maxConcurrentSessions, and maxConcurrentInstances attributes of the serviceThrottling element in the configuration file associated with the scope specified by the scope parameters. If the serviceThrottling element does not exist, the cmdlet creates the element and then sets the values.

You can use scope parameters and piping parameters defined at the end of this topic. You can also use the following throttling parameters with this cmdlet to set the values of the maxConcurrentCalls, maxConcurrentSessions, and maxConcurrentInstances attributes on the serviceThrottling element in the configuration file associated with the specified scope. You need to pass only the parameters that you want to change. For example, if you want to change the value of the Maximum Concurrent Calls parameter, just pass the MaxConcurrentCalls parameter with the appropriate value set.

Throttling parameters

Item

Description

MaxConcurrentCalls

Specifies the limit on the 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.

MaxConcurrentInstances

Specifies the limit on the number of instances that a service host can execute at a time. If the number of instances that are executing is equal to this value, any requests to create additional instances are queued and completed when one of the executing instances completes. The allowed values for this parameter range from 1 to Int32.MaxValue.

MaxConcurrentSessions

Specifies the limit on the 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.

For detailed information about scope parameters (-SiteName, -VirtualPath, -Uri, and so on), see Cmdlet Scope and for detailed information about piping parameters (ApplicationInfo and ServiceInfo), see Cmdlet Piping.

Syntax options for the Set-ASAppServiceThrottling cmdlet


// to set throttling settings at the root level
Set-ASAppServiceThrottling -Root -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32> 

// to set throttling settings at the Web site level
Set-ASAppServiceThrottling -SiteName <String> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32> 

// to set throttling settings at application or service level that the virtual path points to
Set-ASAppServiceThrottling -SiteName <String> -VirtualPath <String> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32> 

// to set throttling settings at a site, application, or service level that an URI points to
Set-ASAppServiceThrottling -Uri <Uri> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32> 

// to get throttling settings at an application level specified by the ApplicationObject; used mainly in piping scenarios
Set-ASAppServiceThrottling -ApplicationObject <ApplicationInfo> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32>
// Ex: Get-ASApplication <use scope parameters SiteName or Uri to resolve to a Web site> | Set-ASAppServiceThrottling -MaxConcurrentCalls 20 -MaxConcurrentInstances 30 -MaxConcurrentSessions 15

// to set throttling settings at a service level specified by the ServiceObject; used mainly in piping scenarios
Set-ASAppServiceThrottling -ServiceObject <ServiceInfo> -MaxConcurrentCalls <Int32> -MaxConcurrentInstances <Int32> -MaxConcurrentSessions <Int32> 
// Ex: Get-ASApplicationService <use scope parameters SiteName or Uri to resolve to an application> | Set-ASAppServiceThrottling -MaxConcurrentCalls 20 -MaxConcurrentInstances 30 -MaxConcurrentSessions 15

  2012-09-12