Jaa


SharePoint Tidbit - Looking at Request management

Hello All,

Thought it was time to provide you with more in-depth information as it might be a good time to consider deploying this service to help with ensuring that load is spread across all WFE appropriately.

What does Request Management do?

Request Management allows SharePoint to understand more about, and control the handling of, incoming requests. Request Management employs a rules based approach, which enables SharePoint to take the appropriate action for a given request based upon administrator supplied configuration.

Please realize that Request Management does not replace load balancers or other network tools. However being able to manage this configuration inside SharePoint is hugely important. As Request Management inherently understands SharePoint, it provides much greater flexibility and helps address some of the most common operational pain points of very large SharePoint deployments.

Request Management enables such “advanced” routing and throttling. Example behaviors include:

  • Route requests to Web Servers with a good health score, preventing impact on lower health Web Servers
  • Prioritize important requests (e.g. end user traffic) by throttling other types of requests (e.g. crawlers)
  • Route requests to Web Servers based upon HTTP elements such as host name, or client IP Address
  • Route traffic to specific servers based on type (e.g. Search, Client Applications)
  • Identify and block harmful requests so the Web Servers never process them
  • Route heavy requests to Web Servers with more resources
  • Allow for easier troubleshooting by routing to specific machines experiencing problems and/or from particular client computers

What components make it work?

  1. Service Instance

This service is named ‘Request Management’ and has no associated service application, management is done solely thru PowerShell.  This service will be provisioned on any server running the SharePoint Foundation Web Application Service.  Request Management is scoped and configured  per Web Application, for each Web Application there is a matching Request Manager which runs under the SPRequestModule.

  1. Request Manager

Reviews the performance of each server to prioritize which server can be used in load balancing, then implements rules of the following types.

    1. Throttling and Routing

                                                               i.      Throttle request if needed

                                                             ii.      Otherwise route request

    1. Prioritization

                                                               i.      Determine the correct group of servers to handle the request

    1. Load Balancing

                                                               i.      Determine the correct single server to handle the request

 

What elements can I configure in Request Manager?

 

  1. Routing Targets (Servers):

A Routing Target is a machine running SharePoint Foundation Web Application Service. By default all servers in the farm running this service are placed in the Routing Targets of the Request Manager. Routing Target is interchangeable with the name Routing Machine.

Each Routing Target has a Static Weighting which is constant and will be evaluated. The Static Weight is assignable, In addition the availability of a Routing Target can be toggled and other advanced properties related to the polling of the machine can be set.

Each Routing Target also has a Health Weighting which is dynamic and will be evaluated. The Health Weighting cannot be assigned and is derived from the Health Score (0 to 10) which is updated by Health Analysis.

Routing Targets must be associated with a Machine Pool.

  1. Machine Pool

Machine Pool is a collection of Routing Targets which are contained within its MachineTargets property.

Machine pools are the target of one or more Routing Rules.

  1. Routing Rules

A Routing Rule is the definition of the criteria to evaluate before routing requests which match the criteria. Each Routing Rule is associated with a Machine Pool and an Execution Group. Routing Rules can have an expiry time set.

  1. Throttling Rules

A Throttling Rule is the definition of the criteria to evaluate before refusing requests which match the criteria. Throttling Rules are NOT associated with a Machine Pool or an Execution Group. Throttling Rules can have an expiry time set.

  1. Execution Groups

A Execution Group is a collection of Routing Rules which allows the precedence of rule evaluation to be controlled and Routing Rules to be managed in batches. There are three execution groups (0, 1 & 2) which are evaluated in order. If no Execution Group for a Routing Rule is specified it is associated with Execution Group 0.

Managing Request management using PowerShell

PowerShell is an amazingly powerful tool and there are several cmdlets that you can use to manage this service and here they are:

Start-SPServiceInstance – Use this cmdlet to start the service “TypeName = Request Management”

Get-SPWebApplication – Use this to get one, many, or all Web Application objects, as that is where we store the request management settings

Get-SPRequestmanagementsettings – This will get the configuration settings for request manager on a per Web Application basis

Set-SPRequestmanagementsettings – Sets the configuration of request manager on a per Web Application basis

Get-SPRoutingMachineInfo – Get the Static weight and other configuration for a server

Set-SPRoutingMachineInfo – Set the Static weight and other configuration for a server

Add-SPRoutingMachineInfo – Adds a new routing target to the farm

Remove-SPRoutingMachineInfo – Removes a routing target from the farm

Add-SPRoutingMachinePool – Used to create a machine pool and add servers to those pools

Get-SPRoutingMachinePool – Gets the machine pool configuration

Set-SPRoutingMachinePool- Sets the machine pool configuration

Remove-SPRoutingMachinePool – Removes a routing pool

New-SPRequestManagementRuleCriteria – Creates the criteria for your Routing or Throttling rule, has 3 parameters Property, MatchType, and Value that must be set.

Add-SPRoutingRule/Add-SPThrottlingRule – Using Criteria and other parameters will create a Routing/Throttling rule

Get-SPRoutingRule/Get-SPThrottlingRule – Returns all Routing/Throttling rule

Remove-SPThrottlingRule/Remove-SPRoutingRule – Remove a Routing/Throttling rule

Set-SPThrottlingRule/Set-SPRoutingRule – Change properties on a Routing/Throttling rule

Pax