Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

48
Building the Perfect SharePoint 2010 Farm Michael Noel, CCO

description

 

Transcript of Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Page 1: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Building the Perfect SharePoint 2010 Farm

Michael Noel, CCO

Page 2: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Michael Noel

Author of SAMS Publishing titles “SharePoint 2010 Unleashed,” “SharePoint 2007 Unleashed,” “SharePoint 2003 Unleashed”, “Teach Yourself SharePoint 2003 in 10 Minutes,” “Windows Server 2008 R2 Unleashed,” “Exchange Server 2010 Unleashed”, “ISA Server 2006 Unleashed”, and many other titles .

Partner at Convergent Computing (www.cco.com / +1(510)444-5700) – San Francisco Bay Area based Infrastructure/Security specialists for SharePoint, AD, Exchange, Security

Page 3: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

What we will cover

• Examine various SharePoint 2010 farm architecture best practices that have developed over the past year

• Examine SharePoint Best Practice Farm Architecture• Understand SharePoint Virtualization Options• Explore SharePoint DR and HA strategies using SQL

2012 AlwaysOn High Availability Technologies• Explore other common best practices (RBS, SSL,

NLB)• Examine best practice security for SharePoint• A large amount of best practices covered (i.e.

Drinking through a fire hose,) goal is for you to be able to take away at least 2-3 useful pieces of information that can be used in your environment

Page 4: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Architecting the Farm

Page 5: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Web

Service Apps

Data

Architecting the FarmThree Layers of SharePoint Infrastructure

Page 6: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

‘All-in-One’ (Avoid)

DB and SP Roles Separate

Architecting the FarmSmall Farm Models

Page 7: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• 2 SharePoint Servers running Web and Service Apps

• 2 Database Servers (AlwaysOn FCI or AlwaysOn Availability Groups)

• 1 or 2 Index Partitions with equivalent query components

• Smallest farm size that is fully highly available

Architecting the FarmSmallest Highly Available Farm

Page 8: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• 2 Dedicated Web Servers (NLB)

• 2 Service Application Servers

• 2 Database Servers (Clustered or Mirrored)

• 1 or 2 Index Partitions with equivalent query components

Architecting the FarmBest Practice ‘Six Server Farm’

Page 9: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Separate farm for Service Applications

• One or more farms dedicated to content

• Service Apps are consumed cross-farm

• Isolates ‘cranky’ service apps like User Profile Sync and allows for patching in isolation

Architecting the FarmIdeal – Separate Service App Farm + Content Farm(s)

Page 10: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Multiple Dedicated Web Servers

• Multiple Dedicated Service App Servers

• Multiple Dedicated Query Servers

• Multiple Dedicated Crawl Servers, with multiple Crawl DBs to increase parallelization of the crawl process

• Multiple distributed Index partitions (max of 10 million items per index partition)

• Two query components for each Index partition, spread among servers

Architecting the FarmLarge Virtualized SharePoint Farms

Page 11: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Virtualization of SharePoint Servers

Page 12: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Dedicated hosts for SharePoint Virtual Guests• No Software on Host OS! (Except A/V or Backup)• Don’t overallocate memory (ballooning) or

Processor (2:1 ratio max)

Virtual Hosts

• Ensure proper amount of IO (0.75 IOPs / GB min, 2.0 IOPS/GB recommended)

• Allocate Passthrough/RDM disk for best perf• If using virtual disks, use fixed-sized, not

dynamically expanding

Disk

• Aggregate multiple NICs on host for the guest networks

• Allocate Passthrough/RDM NICs for best perfNetwork

• Web Role is best candidate, but be cautious if using multiple app pools (800MB/pool)

• Service App systems generally good candidates

• Use caution with the database role!

Virtual Guests

SP Server Virtualization

Virtualization Best Practices

Page 13: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

  vCPU RAM (Bare Minimum)

RAM (Recommend) RAM (Ideal)

Web Only* 2 6GB 8GB 12GB

Service Application Roles Only

2 6GB 8GB 12GB

Dedicated Search Service App

2 8GB 10GB 16GB

Combined Web/Search/Service Apps

4 10GB 12GB 18GB

Database* 4 10GB 16GB 24GB

SP Server Virtualization

Virtualization CPU and Memory Requirements

Page 14: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Allows organizations that wouldn’t normally be able to have a test environment to run one

Allows for separation of the database role onto a dedicated server Can be more easily scaled out in the future

Sample 1: Single Server Environment

SP Server Virtualization

Page 15: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

High-Availability across Hosts

All components Virtualized

Uses only two Windows Ent Edition Licenses

Sample 2: Two Server Highly Available Farm

SP Server Virtualization

Page 16: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Highest transaction servers are physical

Multiple farm support, with DBs for all farms on the SQL cluster

Sample 3: Mix of Physical and Virtual Servers

SP Server Virtualization

Page 17: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Scaling to Large Virtual Environments

SP Server Virtualization

Page 18: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Processor (Host Only)– <60% Utilization = Good– 60%-90% = Caution– >90% = Trouble

Available Memory – 50% and above = Good– 10%-50% = OK– <10% = Trouble

Disk – Avg. Disk sec/Read or Avg. Disk sec/Write– Up to 15ms = fine– 15ms-25ms = Caution– >25ms = Trouble

• Network Bandwidth – Bytes Total/sec– <40% Utilization =

Good– 41%-64% = Caution– >65% = Trouble

• Network Latency - Output Queue Length– 0 = Good– 1-2= OK– >2 = Trouble

Virtualization Performance Monitoring

SP Server Virtualization

Page 19: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

1. Create new Virtual Guest (Windows Server 2008 R2)

2. Install SP2010 Binaries. Stop before running Config Wizard

3. Turn Virtual Guest into Template, modify template to allow it to be added into domain

4. Add PowerShell script to run on first login, allowing SP to be added into farm or to create new farm

End Result - 15 minute entire farm provisioning…quickly add servers into existing farms or create new farms (Test, Dev, Prod) on

demand

Quick Farm Provisioning using SCVMM

SP Server Virtualization

Page 20: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Data Management

Page 21: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Start with a distributed architecture of content databases from the beginning, within reason (more than 50 per SQL instance is not recommended)

• Distribute content across Site Collections from the beginning as well, it is very difficult to extract content after the face

• Allow your environment to scale and your users to ‘grow into’ their SharePoint site collections

Distribute by Default

Data Management

Page 22: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Sample Distributed Content Database Design

Data Management

Page 23: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• BLOBs are unstructured content stored in SQL

• Includes all documents, pictures, and files stored in SharePoint

• Excludes Metadata and Context, information about the document, version #, etc.

• Until recently, could not be removed from SharePoint Content Databases

• Classic problem of structured vs. unstructured data – unstructured data doesn’t really belong in a SQL Server environment

Remote BLOB Storage (RBS)

Data Management

Page 24: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Can reduce dramatically the size of Content DBs, as upwards of 80%-90% of space in content DBs is composed of BLOBs

Can move BLOB storage to more efficient/cheaper storage

Improve performance and scalability of your SharePoint deployment – But highly recommended to use third party

Remote BLOB Storage (RBS)

Data Management

Page 25: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

SQL Database Optimization

Page 26: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

DB-AFile 1

DB-BFile 1

Volume #1

DB-AFile 2

DB-BFile 2

Volume #2

DB-AFile 3

DB-BFile 3

Volume #3

DB-AFile 4

DB-BFile 4

Volume #4

Tempdb File 1 Tempdb File 2 Tempdb File 3 Tempdb File 4

Multiple Files for SharePoint Databases

SQL Server Optimization

Page 27: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Break Content Databases and TempDB into multiple files (MDF, NDF), total should equal number of physical processors (not cores) on SQL server.

• Pre-size Content DBs and TempDB to avoid fragmentation• Separate files onto different drive spindles for best IO perf.• Example: 50GB total Content DB on Two-way SQL Server

would have two database files distributed across two sets of drive spindles = 25GB pre-sized for each file.

Multiple Files for SharePoint Databases

SQL Server Optimization

Page 28: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• TempDB is critical for performance• Pre-size to 20% of the size of the largest content

database.• Break into multiple files across spindles as noted• Note there is a separate TempDB for each physical

instance• Note that if using SQL Transparent Data Encryption

(TDE) for any databases in an instance, the tempDB is encrypted.

Tempdb Best Practices

SQL Server Optimization

Page 29: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Implement SQL Maintenance Plans!• Include DBCC (Check Consistency) and either

Reorganize Indexes or Rebuild Indexes, but not both!

• Add backups into the maintenance plan if they don’t exist already

• Be sure to truncate transaction logs with a T-SQL Script (after full backups have run…)

SQL Maintenance Plans

Data Management

Page 30: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

USE CompanyABC_SP2010_ContentDB01;GOALTER DATABASE CompanyABC_SP2010_ContentDB01SET RECOVERY SIMPLE;GODBCC SHRINKFILE (CompanyABC_SP2010_ContentDB01_log, 100);GOALTER DATABASE CompanyABC_SP2010_ContentDB01SET RECOVERY FULL;GO

Truncate Transaction Logs Statement

Data Management

Page 31: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

High Availability and Disaster Recovery

Page 32: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

High Availability and Disaster RecoverySQL Server Solution

Potential Data Loss

(RPO)

Potential Recovery

Time (RTO)

Automatic Failover

Readable Secondaries

AlwaysOn Availability Group - synchronous-commit

Zero Seconds Yes 0 - 2

AlwaysOn Availability Group - asynchronous-commit

Seconds Minutes No 0 - 4

AlwaysOn Failover Cluster Instance NA Seconds-to-minutes

Yes NA

Database Mirroring - High-safety (sync + witness)

Zero Seconds Yes NA

Database Mirroring - High-performance (async)

Seconds Minutes No NA

Log Shipping Minutes Minutes-to-hours

No Not duringa restore

Backup, Copy, Restore Hours Hours-to-days

No Not duringa restore

Comparison of High Availability and Disaster Recovery Options

HA and DR

Page 33: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 34: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Install Windows Server 2008 R2 w/SP1 on multiple nodes

Enable the Failover Cluster Feature on each node

Use the Failover Cluster Manager Wizard to create a cluster.

Name the cluster a unique name that will be separate from the instance name that will be used for SharePoint

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 35: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Install .NET Services 3.5 Feature on each SQL node

• Install SQL 2012 Enterprise Edition Database Services (Also recommend adding SQL Management Tools – Complete)

• Ensure proper Windows Firewall ports are open

• Service Account for SQL– Use the same service account for all nodes– Don’t use Network Service– If using Kerberos, make sure all SQL names have SPNs associated

with the service account

• Make sure databases are set to FULL recovery mode

• Ensure that the file paths and drive letters are consistent throughout all instances (ideally, or config will have to be manual)

• Copy or Create SharePoint databases on Primary node only (use SQL Alias to change name later)

• Perform a full backup of your SharePoint databases

• Create a file share location that is accessible by all nodes that will be used for the shared backups (i.e. \\SQL1\Backups)

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 36: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Enable AlwaysOn High Availability in SQL Server Configuration Manager

Repeat on Each Node

Restart SQL Services

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 37: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Ideally use the New Availability Group Wizard, it automates the process

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 38: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Be sure to have a shared network location for the backup files (Created in earlier step)

• Depending on size of databases, this could take a while

• Backups can also be pre-staged (Join Only)

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 39: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Validation should show all green, except warning for Listener

• The listener (‘SQL’ in this example) will be created later, and is required for SharePoint to connect to

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 40: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• After the wizard completes, manually create the Availability Group Listener

• This is the shared name that SharePoint will connect to and will provide failover (Also called the ‘Client Access Point’)

• Modify the DNS record for this listener to have a low TTL (60 seconds or less) for cross-subnet failover scenarios

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 41: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Creating AlwaysOn Availability Groups in SQL 2012

HA and DR

Page 42: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Hardware Based Load Balancing (F5, Cisco, Citrix NetScaler – Best performance and scalability

• Software Windows Network Load Balancing fully supported by MS, but requires Layer 2 VLAN (all packets must reach all hosts.) Layer 3 Switches must be configured to allow Layer 2 to the specific VLAN.

• If using Unicast, use two NICs on the server, one for communications between nodes.

• If using Multicast, be sure to configure routers appropriately

• Set Affinity to Single (Sticky Sessions)

• If using VMware, note fix to NLB RARP issue (http://tinyurl.com/vmwarenlbfix)

Windows Network Load Balancing

HA and DR

Page 43: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Best Practice – Create Multiple Web Apps with Load-balanced VIPs (Sample below)–Web Role Servers

– sp1.companyabc.com (10.0.0.101) – Web Role Server #1– sp2.companyabc.com (10.0.0.102) – Web Role Server #2

–Clustered VIPs shared between SP1 and SP2 (Create A records in DNS)– spnlb.companyabc.com (10.0.0.103) - Cluster– spca.companyabc.com (10.0.0.104) – SP Central Admin– spsmtp.companyabc.com (10.0.0.105) – Inbound Email VIP– home.companyabc.com (10.0.0.106) – Main SP Web App

(can be multiple)– mysite.companyabc.com (10.0.0.107) – Main MySites Web

App

Windows Network Load Balancing - Sample

HA and DR

Page 44: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Security and Documentation

Page 45: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Document all key settings in IIS, SharePoint, after installation

• Consider monitoring for changes after installation for Config Mgmt.

• Fantastic tool for this is the SPDocKit - can be found at http://tinyurl.com/spdockit

SPDocKit

Document SharePoint

Page 46: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

• Infrastructure Security and Best practices– Physical Security– Best Practice Service Account Setup– Kerberos Authentication

• Data Security– Role Based Access Control (RBAC)– Transparent Data Encryption (TDE) of SQL Databases– Antivirus

• Transport Security– Secure Sockets Layer (SSL) from Server to Client– IPSec from Server to Server

• Edge Security– Inbound Internet Security (Forefront UAG/TMG)

• Rights Management

Five Layers of SharePoint Security

Security

Page 47: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

SharePoint 2010 Unleashed from SAMS Publishing (http://www.samspublishing.com)

Microsoft ‘Virtualizing SharePoint Infrastructure’ Whitepaper (http://tinyurl.com/virtualsp)

Microsoft SQL Mirroring Case Study (http://tinyurl.com/mirrorsp )

Failover Mirror PowerShell Script (http://tinyurl.com/failovermirrorsp )

SharePoint Kerberos Guidance (http://tinyurl.com/kerbsp)

SharePoint Installation Scripts (http://tinyurl.com/SPFarm-Config)

SharePoint Documentation Toolkit

(http://tinyurl.com/SPDocKit)

Contact us at CCO.com

For More Information

Page 48: Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012

Thanks for attending!Questions?

Michael NoelTwitter: @MichaelTNoel

www.cco.com

Slides: slideshare.net/michaeltnoel

Travel blog: sharingtheglobe.com