52

#SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Embed Size (px)

Citation preview

Page 1: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)
Page 2: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Request Management inSharePoint 2013Spencer HarbarArchitect

SPC271

Page 3: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

About Spencer Harbar

• Microsoft Certified Solutions Master | SharePoint• Microsoft Certified Architect | SharePoint 2010 • Microsoft Certified Master | SharePoint 2010• Microsoft Certified Master | SharePoint 2007• Microsoft Certified Master | SharePoint Instructor & Author • Most Valuable Professional | SharePoint Server• SharePoint Patterns & Practices Advisory Board Member• Works with SharePoint Product Group on Readiness• Author for MSDN & TechNet

SharePoint ArchitectEdinburgh, United Kingdom

www.harbar.net | [email protected] | @harbars

Page 4: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

AgendaWhat is Request Management?

Usage Scenarios Components, Rules and Evaluation

Architectural Overview

Example Scenario and Demonstration Wrap Up and Recommendations

#SPC271 IT-Pro, Level 300Demo Heavy Session (Hopefully!)

Configuration and Management

Page 5: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

What is Request Management?

Page 6: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

What is Request Management?

Allows SharePoint to understand more about, and control the handling of, incoming HTTP requests

Having knowledge of the nature of incoming requests allows SharePoint to customize the response to each request

Page 7: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

What is Request Management?

Decide if a farm should accept a request

And if so, which web server should handle the request

Manages and routes incoming requests

Rules Based System

Deny potentially harmful requests

Route good requests

Optimize Performance

Page 8: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Usage Scenarios

Page 9: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Reliability and Performance

Request Management can route to web servers that have better performance, keeping low performance web servers available

Routing new requests to a web server with low performance can increase latency and cause timeouts

Requests from users and bots (e.g. search crawlers) have equal priority

Prioritize requests by throttling requests from bots to instead serve requests from end users

Page 10: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Capacity Management

Request Management can send multiple or single requests to web servers that are designated to handle them

All web servers must be able to handle requests because they could be sent to any web server

Define “Server Groups” to handle certain types of traffic, e.g. Office Client Apps, Search Crawls

Request Management can send requests to logical groups of servers based upon request characteristics

Page 11: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Scalability

Request Management can perform application routing so that a load balancer can concentrate on balancing load at the network level

Overwhelmed / Complex load balancer

Host scaling limited by load balancer

Request Management can route requests to independent content farms

Page 12: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Operational Service Management

Request Management can send all requests of a specific type (e.g. Search, User Profiles, Office Web Apps) to specific servers

Server fails or responds slowly

Difficult to identify root cause of problems

Request Management can help locate and isolate the problem, whilst troubleshooting

Page 13: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Architectural Overview

Page 14: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Request Management Fundamentals

Available in all SKUs

SharePoint Foundation Feature

Zero footprint before configuration

OFF by default

Critical to IA and deployment planning

Scoped at the Web Application

Page 15: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

SharePoint Web Server

SharePoint Foundation Web Application Service

Architectural Overview

Request Manager (RM)

Request Throttling and Prioritization

Filter out requests which should be throttled or prioritized

Request Routing

Select which web servers the request may be sent to

Request Load Balancing

Select a single web server to route to, based upon weighting schemes

Request Management Service

Incoming Requests

Configuration

Page 16: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Architectural Overview

Request Manager is implemented in SPRequestModule

Request Manager is the first code that runs in response to HTTP requests

SharePoint Foundation Web Application Service (a.k.a. WFE)

Request Manager runs in process on the web server

Starting the Request Management Service Instance elsewhere serves no purpose

Request Management Service Instance should run on the web server

Page 17: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Web Application Configuration

Impacts traditional deployments that use IIS host headers

IIS must be “listening” for Request Management to process requests

Where Request Management is configured

Processes all requests

Intended deployment includes a Web Application with NO host headers

Request Management may route requests to another Web Application

This Web Application may not host the content requested

Page 18: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Host Based Sites (a.k.a Host Named Site Collections)

Change to traditional deployments that use IIS host headers

Preferred logical architecture approach for SharePoint 2013

www.contoso.comwww.fabrikam.comwww.tailspin.com

Multiple Site Collections with “top level” host names in a single Web Application

For supportability

Even if no end user accesses that entry point

A root Site Collection is required

Page 19: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Deployment Modes

Request Management Service runs on the web servers in a farm

Common On-Premises environments

Integrated Mode Dedicated Mode

A dedicated SharePoint farm which manages requests exclusively, and routes request to other farms

Large scale hosting environments

Page 20: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Integrated Mode Deployment

SharePoint Farm

Web Servers

RMRM

RM

Load Balancer

Page 21: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Dedicated Mode Deployment

Request Management Farm

Web Servers

RM RM RM

Load Balancers

SharePoint Farm

SharePoint Farm

Page 22: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Comparing Deployment Modes

Characteristic Integrated Mode

Dedicated Mode

Independent scaling No YesIndependent resource usage No YesLarge scale hosting scenarios No YesCommon on premises deployment

Yes No

Edition independence No YesContent Farm IIS Binding dependence

Yes No

Page 23: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Components,Rules and Evaluation

Page 24: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Request Management Components

Static Weighting – configurable

Health Weighting – the SharePoint health score

Routing Targetsa.k.a. Machine Targets

Machine Pools

A collection of Routing Targets

The target of Routing Rules

Page 25: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Request Management Rules

Definition of criteria to evaluate before routing requests

Associated with a Machine Pool

Routing Rules Throttling Rules

Definition of criteria to evaluate before refusing requests

NOT associated with a Machine Pool

Page 26: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Request Management Components

A collection of Routing Rules

Allows for evaluation precedence

Three Execution Groups (0,1,2)

Execution Groups Rule Criteria

Criteria to evaluate

Based upon HTTP properties

Page 27: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Rule Criteria

UrlUrlReferrerUserAgentHost

Properties Match Methods

StartsWithEndsWithEqualsRegEx (use with caution!)

IPHttpMethodSoapActionCustomHeader

Page 28: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Rule Evaluation

If matched, the request is refusedIf NOT matched, Routing Rules in Execution Group 0 are evaluated

Throttling Rules

If matched, the request is routed to the correct Routing TargetIf NOT matched, Routing Rules in Execution Group 1 are evaluated

Routing Rules in Execution Group 0

If matched, the request is routed to the correct Routing TargetIf NOT matched, Routing Rules in Execution Group 2 are evaluated

Routing Rules in Execution Group 1

If matched, the request is routed to the correct Routing TargetIf NOT matched, the request is routed to ANY available Routing Target

Routing Rules in Execution Group 2

Page 29: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Rule Evaluation

Page 30: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Rule Evaluation Gotchas

Create the most important rules in Execution Group 0

As soon as a match is found, no more Execution Groups are evaluated

If no rules are matched, the request is routed to ANY available Routing TargetIf you wish to route everything to a subset of machines, create a rule with no criteria and associate with the subset of machines

Page 31: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Configuration and Management

Page 32: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Configuration and Management

No Central Administration

100% Windows PowerShellNo

!

Page 33: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Key Windows PowerShell cmdlets

Core configuration parent, scoped to the web application. Piped into other cmdlets

*.SPRequestManagementSettings

Page 34: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Key Windows PowerShell cmdlets

Configure Machine Pools and their Routing Targets

*.SPRoutingMachinePool

Page 35: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Key Windows PowerShell cmdlets

Configure Routing TargetsAlso necessary when configuring Dedicated Mode

*.SPRoutingMachineInfo

Page 36: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Key Windows PowerShell cmdlets

Define criteria for Throttling or Routing Rules

New-SPRequestManagementRuleCriteria

Page 37: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Key Windows PowerShell cmdlets

Configure Throttling Rules

*.SPThrottlingRule

Page 38: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Key Windows PowerShell cmdlets

Configure Routing Rules and their Execution Group

*.SPRoutingRule

Page 39: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Monitoring

Category: Request Management

ULS Logs

Regular HTTP logsSPPING Mechanism

IIS Logs

SharePoint Foundation: Request Management

Performance Counters

Page 40: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Example Scenario

Page 41: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Example Scenario

Request Management in Integrated Mode

Single SharePoint Farm

SP1, SP2, SP3load balanced using BIG-IP Local Traffic Manager

Three SharePoint Web Servers

www.contoso.comwww.fabrikam.comwww.adventureworks.com

Three Host Named Site Collections (HNSC)

Page 42: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Requirements

Requests from OneNote client should be refused

Requests for PDFs should be served by SP1 or SP2

Requests for the Fabrikam site collection should be served by SP1 or SP2

Requests for the Adventure Works site collection should be served by SP1 or SP2

Requests for the Contoso site collection should be served by SP3

Page 43: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Logical Architecture

Page 44: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Demo

Integrated Mode Request Management

Page 45: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Demonstration Recap

Starting the Request Management Service

Creating Machine Pools

Configuring Routing Targets

Creating Throttling Rules

Creating Routing Rules

Validation and Testing

Page 46: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Wrap Up and Recommendations

Page 47: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Summary

Reliability, Performance, Capacity and Scalability

Powerful capability to improve operational service

Application aware throttling and routing

Does NOT replace your load balancer

Just because you can, doesn’t mean you should!

Entirely optional

Page 48: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Recommendations

A single bad rule could hose the entire farm

Rules planning is paramount

Significant performance penalty

Avoid badly authored Regular Expressions

Web Application with NO host headers, Host Named Site Collections

Implement Host Based Sites

Page 49: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Recommendations

You need to be able to easily manage the RM configuration

Windows PowerShell composability is key

Interaction and operational service decisions

Plan co-existence with load balancer

Page 50: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Additional Resources

Three part series:

http://bit.ly/PArRBC http://bit.ly/TeMNz0 http://bit.ly/VMQkbV

Comprehensive coverage and all the scripts

http://bit.ly/PPa9cB

TechNet Configuration Guidance

http://bitly.com/RQEhIx

Additional scripts

Page 51: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

Evaluate this session now on MySPC using your laptop or mobile device: http://myspc.sharepointconference.com

MySPC

Page 52: #SPC271 IT-Pro, Level 300 Demo Heavy Session (Hopefully!)

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.