Top Banner
1 SPSTC @SPSTC #SPSTC SharePoint Saturday Twin Cities True Confessions of Host Named Site Collections in SharePoint 2013 Bonnie Springer November 22, 2014
34

True Confessions of Host named site collections in SharePoint 2013

Jul 28, 2015

Download

Technology

Bonnie Springer
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: True Confessions of Host named site collections in SharePoint 2013

1 SPSTC

@SPSTC #SPSTC

SharePoint Saturday

Twin CitiesTrue Confessions of Host Named Site Collections in SharePoint 2013Bonnie SpringerNovember 22, 2014

Page 2: True Confessions of Host named site collections in SharePoint 2013

Thank you #SPSTC sponsors!

Page 3: True Confessions of Host named site collections in SharePoint 2013

3 SPSTC

@SPSTC #SPSTC

Employed at SAS since 2000 SharePoint administrator since 2003 Email: [email protected] Twitter: @bonniespringer LinkedIn:

www.linkedin.com/pub/bonnie-springer/7/911/224/

About Me

Page 4: True Confessions of Host named site collections in SharePoint 2013

4 SPSTC

@SPSTC #SPSTC

SharePoint environment at SAS What are host named site collections

(HNSC)? When to use HNSC How to convert path-based to HNSC

(Demo) Caveats Additional information

Overview

Page 5: True Confessions of Host named site collections in SharePoint 2013

5 SPSTC

@SPSTC #SPSTC

Alternate Presentation Titles

• Can this farm be saved?• Don’t Do What We Did• Why SharePoint? Why?• Descent into SharePoint Madness• I Love SharePoint More Than SharePoint Loves Me

Page 6: True Confessions of Host named site collections in SharePoint 2013

6 SPSTC

@SPSTC #SPSTC

Confession #1My grandfather had interesting taste in reading material.

Page 7: True Confessions of Host named site collections in SharePoint 2013

7 SPSTC

@SPSTC #SPSTC

SharePoint used at SAS since 2001 Migrated from SP 2001 -> SP2003 -> SP2007 ->

SP2010 -> SP2013 Intranet and extranet SP farms; dev and test

farms HQ absorbed country deployments/affiliate

company farms over the years; centralized farm SP2010 intranet prod farm: 4 wfe (48GB ram, 8

core), 2 app, 2 query, 2 index, 4 SQL; all physical; load balanced with F5

By 2010, we had 120+ web applications, 150+ content databases, 8000+ site collections, 1.5 TB in content databases

We did consolidate web apps, 85 at start of SP2013 migration

SharePoint at SAS – early years

Page 8: True Confessions of Host named site collections in SharePoint 2013

8 SPSTC

@SPSTC #SPSTC

Began planning intranet migration to SharePoint 2013 in November, 2012

Stayed on-premises with intranet farm Farm design similar to SP2010; separate search

farm SP2013 servers all virtual (16GB ram, 4 core);

SQL physical Content migration started in September, 2013 Migration to SP2013 completed in June, 2014

SharePoint 2013 at SAS

Page 9: True Confessions of Host named site collections in SharePoint 2013

9 SPSTC

@SPSTC #SPSTC

Confession #2We didn’t pay enough attention to our logical architecture during the planning phase.

Page 10: True Confessions of Host named site collections in SharePoint 2013

10 SPSTC

@SPSTC #SPSTC

SP2013 would behave similarly to SP2010 as far as # of web apps – that is, if hardware was robust enough, we could accommodate the same number of web apps in SP2013

Host named site collections were for hosting scenarios

Lack of documentation on how to move to host named site collections meant that HNSC were optional for SP2013

Incorrect assumptions about SP2013

Page 11: True Confessions of Host named site collections in SharePoint 2013

11 SPSTC

@SPSTC #SPSTC

SP2007: “Supported” limit up to 99 web apps per farm/SSP

SP2010: No documented support limits for web apps; 10 app pools per server

SP2013: Supported limit up to 20 web apps per farm; 10 app pools per server From MS: We recommended limiting the number of web

applications as much as possible.

SharePoint Capacity Limits – Web Applications

Page 12: True Confessions of Host named site collections in SharePoint 2013

12 SPSTC

@SPSTC #SPSTC

First 15 or so web apps created OK Around web app #25, we started to notice much

longer web app creation times; performance issues experienced on entire farm which got progressively worse with each additional web app

All sites would be inaccessible for 20 minutes to 2 hours until new web app finished provisioning; server busy messages

New web apps would often partially provision

Issues with SP2013 migration

Page 13: True Confessions of Host named site collections in SharePoint 2013

13 SPSTC

@SPSTC #SPSTC

We added more memory (increased to 32GB) We added more CPUs (increased to 8 core) We tweaked the load balancer We blamed SQL (we were wrong)

First attempts to fix performance

Page 14: True Confessions of Host named site collections in SharePoint 2013

14 SPSTC

@SPSTC #SPSTC

Confession #3I reached a breaking point at the creation of web app #52. I have evidence.

Page 15: True Confessions of Host named site collections in SharePoint 2013

15 SPSTC

@SPSTC #SPSTC

The “This is not sustainable” email On Oct 5, 2013, at 9:26 PM, "Bonnie Springer" <[email protected]> wrote:

I’ve been trying since 2pm to create a new web application on the SP2013 production farm. The first web app I tried to create (site1) took about 2 hours … well, it may have taken longer had it not resulted in an error message about an object being referenced that already existed. When I looked at IIS and the virtual directory locations, site1 appeared to be partially provisioned – so this one is going to have to be deleted and recreated. Sites were serving at this time. I decided to try to create another new web app. I first did an iisreset and restarted the timer service and tracing service on each wfe server. I then kicked off the web app creation for site2 at 6:33pm. It’s still running as of 8:55pm. I tested site access early on and sites were rendering. However, around 7:48pm, I couldn’t get any site to serve – not even existing site3 when targeting a specific wfe server. At 8:36pm, site3 displayed this error in the browser: The server is busy now. Try again later I finally got a site to render at 8:54 which was around the time I started getting a response from site3.sas.com/pages/default.aspx. As of 8:57, I got another site to render so sites seem to be coming back up. I checked site2 and it appears to be nearing the end of the provisioning process. I see that the virtual directories were created between 8:44 – 8:50pm (depending on the wfe server). The PowerShell command that I kicked off at 6:33 is still running (that is, it hasn’t returned to the command prompt with a message that the new web app has been created). I think we’re nearing the end of this drama though. All of the timer jobs (there were dozens that had piled up in the past 2 hours have now executed. More sites that I’ve tested are now rendering. CPU is settling down to normal ranges now. Ah … as of 9:05, the new-spwebapplication command has finished running on sp2013wfe04. I think we’re “back to normal” now … over 2.5 hours later. Here is my concern … I’ve got a number of web apps to create to prepare for upcoming migrations. This evening’s exercise for the site2 creation was not fun and, at various points in the process, I was concerned that the farm may not come back. Each new web app that we create seems to pose greater and greater risk to the farm. At the risk of not being able to meet the migration schedule for the upcoming week, I’m going to stop creating web apps because I’m concerned about the stability and sustainability of the farm in its current state. I recommend that we open a support case with Microsoft.

Page 16: True Confessions of Host named site collections in SharePoint 2013

16 SPSTC

@SPSTC #SPSTC

Here is my concern … I’ve got a number of web apps to create to prepare for upcoming migrations. This evening’s exercise for the site2 creation was not fun and, at various points in the process, I was concerned that the farm may not come back. Each new web app that we create seems to pose greater and greater risk to the farm. At the risk of not being able to meet the migration schedule for the upcoming week, I’m going to stop creating web apps because I’m concerned about the stability and sustainability of the farm in its current state. I recommend that we open a support case with Microsoft.

Where I surrender and admit defeat:

Page 17: True Confessions of Host named site collections in SharePoint 2013

17 SPSTC

@SPSTC #SPSTC

Confession #4We opened a support case with Microsoft. There was no free love from Microsoft. They told us to call back when we had 20 web apps or fewer.

Page 18: True Confessions of Host named site collections in SharePoint 2013

18 SPSTC

@SPSTC #SPSTC

Host Named Site Collections (HNSC)

The solution:

Page 19: True Confessions of Host named site collections in SharePoint 2013

19 SPSTC

@SPSTC #SPSTC

HNSC available since SharePoint 2003 (scalable hosting mode)

Host multiple site collections with unique DNS name under one web app

Hosting web app Has no DNS bindings in IIS Answers all requests on designated port (80 by default)

SP2010 improvements Ability to use managed paths with HNSC Ability to use off-box SSL termination with HNSC

Office 365 implemented with HNSC

What are host named site collections?

Page 20: True Confessions of Host named site collections in SharePoint 2013

20 SPSTC

@SPSTC #SPSTC

MS guidance for SP2013 to use single web app Very scalable, 250000 (non-personal) site

collections per farm Host multiple site collections under one web app,

each site collection has unique URL Much more efficient use of resources

Fewer web apps, IIS sites Reduced memory requirements, cheaper hardware Greatly reduced number of timer jobs

Fewer web apps, less patching time Don’t need to use “IISRESET /noforce” when

creating a new HNSC site collection

Why use host named site collections?

Page 21: True Confessions of Host named site collections in SharePoint 2013

21 SPSTC

@SPSTC #SPSTC

Web application user policies Customizations scoped to web app Very large content databases Alternate access mappings are needed Service Application connections Separate App Pool considerations Requirement for self-service site creation feature Timer job configuration needs Web.config customizations

When might you not want to use host named site collections?

Page 22: True Confessions of Host named site collections in SharePoint 2013

22 SPSTC

@SPSTC #SPSTC

Created via GUI or PowerShell No host header in IIS bindings Port 80 or 443

Port 80/443 may be easiest if converting from path-based site collections

Can use port other than 80/443, if desired

Create root site collection (needed for crawling) All of your HNSC can live under this one web app

Creating a web app for HNSCs

Page 23: True Confessions of Host named site collections in SharePoint 2013

23 SPSTC

@SPSTC #SPSTC

Step 1: Run SharePoint backup of path-based site collection Backup-SPSite -Identity <URL> -Path C:\Backup\

site_name.bak -Confirm:$false

Step 2 [optional]: Create new database for restore New-SPContentDatabase -Name sitenameHNCDB –

DatabaseServer <dbserver> -WebApplication <HNSC_WebApp_URL>

Step 3: Restore site collection backup as a HNSC Restore-SPSite -Identity <URL> -Path C:\Backup\

site_name.bak -HostHeaderWebApplication <HNSC_WebApp_URL> -DatabaseName sitenameHNCDB -DatabaseServer <dbserver> -Confirm:$false

How to convert path-based web app to HNSC (no child site collections)

Page 24: True Confessions of Host named site collections in SharePoint 2013

24 SPSTC

@SPSTC #SPSTC

Step 4: Change alternate access mappings for path-based We append “old” to the site name Example: http://acmeold.contoso.com Allows us to access path-based site, if needed to verify content

Step 5: Delete path-based web app Remove-SPWebApplication -identity http://acmeold.contoso.com

-RemoveContentDatabases –DeleteIISSite

How to convert path-based web app to HNSC (no child site collections)

Page 25: True Confessions of Host named site collections in SharePoint 2013

25 SPSTC

@SPSTC #SPSTC

DEMO 1

How to convert path-based web app to HNSC (no child site collections)

Page 26: True Confessions of Host named site collections in SharePoint 2013

26 SPSTC

@SPSTC #SPSTC

Step 1: Run SharePoint backups for each path-based site collection Backup-SPSite -Identity <URL> -Path C:\Backup\

site_name.bak -Confirm:$false

Step 2 [optional]: Create new database(s) for restore New-SPContentDatabase -Name sitenameHNCDB –

DatabaseServer <dbserver> -WebApplication <HNSC_WebApp_URL>

Step 3: Create needed managed paths New-SPManagedPath “<name>" -HostHeader -Explicit

PowerShell only, HNSC managed paths don’t display in Central Admin

Both wildcard and explicit inclusions are supported Up to 20 host header managed paths per farm

How to convert path-based web app to HNSC (with child site collections)

Page 27: True Confessions of Host named site collections in SharePoint 2013

27 SPSTC

@SPSTC #SPSTC

Step 4: Restore site collection backup as a HNSC Restore-SPSite -Identity <URL> -Path C:\Backup\

site_name.bak -HostHeaderWebApplication <HNSC_WebApp_URL> -DatabaseName sitenameHNCDB -DatabaseServer <dbserver> -Confirm:$false

Step 5: Change alternate access mappings for path-based We append “old” to the site name Example: http://acmeold.contoso.com Allows us to access path-based site, if needed to verify content

Step 6: Delete path-based web app Remove-SPWebApplication -identity

http://acmeold.contoso.com -RemoveContentDatabases –DeleteIISSite

How to convert path-based web app to HNSC (with child site collections)

Page 28: True Confessions of Host named site collections in SharePoint 2013

28 SPSTC

@SPSTC #SPSTC

DEMO 2

How to convert path-based web app to HNSC (no child site collections)

Page 29: True Confessions of Host named site collections in SharePoint 2013

29 SPSTC

@SPSTC #SPSTC

1 web app for HNSC Approximately 55 web apps converted to

HNSCs 8 HNSC managed paths 60+ content databases

Still have 14 path-based web apps My Site host path-based

Performance, stability greatly improved On-going effort to reduce number of path-based

web apps

End result for SAS after conversion to HNSC

Page 30: True Confessions of Host named site collections in SharePoint 2013

30 SPSTC

@SPSTC #SPSTC

Confession #5We were stumped about how to restore a HNSC to another farm. And this cat looks terrified.

Page 31: True Confessions of Host named site collections in SharePoint 2013

31 SPSTC

@SPSTC #SPSTC

Mount database copy in new farm, attach to HNSC web app Mount-SPContentDatabase -WebApplication

http://<HNSCWebAppURL> -Name <databasename> -DatabaseServer <dbservername>

If URL different in new farm, must set the URL Set-SPSite -Identity http://<oldURL> -Url http://<newURL>

Moving HNSC to another farm

Page 32: True Confessions of Host named site collections in SharePoint 2013

32 SPSTC

@SPSTC #SPSTC

HNSC Managed paths Managed via PowerShell only, not visible in Central Admin Collision with secondary URLs Limit of 20 per farm

Search configuration When root site collection crawled, all HNSC also crawled even though

they don’t appear in content sources

Extra step needed for moving content between farms if URL changes

Third-party utility views of farm structure, need to look for site collections under HNSC web app, can confuse users

Lessons learned/caveats for HNSC

Page 34: True Confessions of Host named site collections in SharePoint 2013

34 SPSTC

@SPSTC #SPSTC

Remember to put your name on your vendor bingo cards, complete the card and turn them in at the end of the day to win prizes. Must be present to win.

Please complete an evaluation for each session and the overall event using Guidebook. If you haven't downloaded the app to their iPhone or Android device, you can use the Guidebook site https://guidebook.com/guide/27567/.

Any presentations provided to the SharePoint Saturday team will be posted on the SPSTC.com site after the event.

SPSTC Event Reminders