Introduction
SharePoint 2013 Deployment Series |
How to setup a database server alias |
How to configure Cache |
How to deploy a search service application using PowerShell |
This posting walks you through the steps necessary for configuring your SharePoint 2013 farm's caching functions, including: object cache, disk-based (BLOB) cache, and the new (AppFabric) distributed cache. This posting assumes a traditional SharePoint farm three-tiered topology, where the application server(s) host most services, as well as the farm's CA web application, and the WFEs host primarily the customer-facing web applications and the search query and indexing services.
Preparation
- Use only the SharePoint Setup/Administration account when remoting into any SharePoint server to make modifications and configurations.
- Verify that the SharePoint Setup/Administration account is a member of the Administrators group on each server.
- Verify that the account that you want to use to run the distributed cache service is a member of the Administrators group on each server running SharePoint Server 2013.
- Identify domain accounts that you want to use as the Object cache Reader and User accounts (eg, spSuperR, spSuperU).
- If you are using HOST files to configure external or internal (or both) static routing amongst your farm servers, check the HOST file on each of the farm servers and verify that the host names in the file are fully qualified. Otherwise, you may see error event IDs 1000 and 1026 appearing in the application event log of the server hosting the AppFabric service.
Procedure
- Configure Object Cache
- Add Object Cache Accounts
- Reference: Configure object cache user accounts in SharePoint Server 2013
- Remote into the application server under the SharePoint setup Administration account.
- Go to: Central Administration > Application Management > Manage Web Applications.
- Select a web application.
- From the ribbon, click User Policy.
- Click Add Users.
- Leave the zone default as All zones, and then click Next.
- In the Choose Users section, add the account that you want to use as the Object Cache Reader.
- In the Choose Permissions section, check Enable Read - Has full read-only access.
- Click Finish.
- Click Add Users again.
- Leave the zone default as All zones, and then click Next.
- In the Choose Users section, add the account that you want to use as the Object Cache User.
- In the Choose Permissions section, check Full Control - Has full control.
- Click Finish.
- Add Object Cache Account Claims User Names [see note]
- Open a SharePoint Management Shell as administrator
- Execute the following script:
$wa = Get-SPWebApplication -Identity "<webapplication>" $wa.Properties["portalsuperuseraccount"] = "i:0#.w|Domain\spSuperU" $wa.Properties["portalsuperreaderaccount"] = "i:0#.w|Domain\spSuperR" $wa.Update()
- Execute IISReset on all machines.
- Configure Disk-based Cache Settings
- Reference: Configure BLOB cache settings
- The following steps must be performed on each WFE.
- Remote into the WFE under the SharePoint Administrator account.
- Go to: C:\inetpub\wwwroot\wss\VirtualDirectories\.
- Look for the folder corresponding to your web application and open it.
- Look for the file Web.Config.
- Open this file in any text editor.
- In this file, look for the XML tag, <BlobCache...
- Look for these attributes of this tag:
- location
- enabled
- Change the location attribute to whatever is appropriate to your system.
Best Practice is to point it to another drive on the WFE so that its write operations do not impact the system drive write operations.
- Change the enabled attribute to true.
- Save the file.
- Repeat for each WFE.
- Remove Unnecessary Cache Host
- Check AppFabric Status
- References: Cache Administration with Windows PowerShell (Windows Server AppFabric Caching) , SharePoint 2013 + Distributed Cache (AppFabric) Troubleshooting
- Remote into the application server as the SharePoint setup user administrator account.
- Launch the SharePoint Management Shell as administrator.
- Run the following script:
This returns a list of your hosts and their network status. You want them all to be online.Get-SPServiceInstance | ? {($_.service.tostring()) -eq "SPDistributedCacheService Name=AppFabricCachingService"} | select Server, Status - In the same shell, run the next script:
Use-CacheCluster Get-CacheHost
This returns the AppFabricCacheService status on each host. They should all be UP. - If these are not UP, the removal will fail.
- Remove the host
- References: Manage the Distributed Cache service in SharePoint Server 2013, SharePoint 2013: Distributed Cache (AppFabrikCache) part 2/2
- Remote into the application server as the SharePoint setup user administrator account.
- Launch the SharePoint Management Shell as administrator.
- Run the following script:$instanceName = “SPDistributedCacheService Name = AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {( $_.service.tostring()) –eq $instanceName –and ($_.server.name) –eq $env:computername $serviceInstance.UnProvision() Remove-SPDistributedCacheServiceInstance
- Change Distributed Cache Service Account
- Reference: Manage the Distributed Cache service in SharePoint Server 2013: Change the service account, Changing the Distributed Cache Service Account
- Remote into the application server as the SharePoint setup user administrator account.
- Launch the SharePoint Management Shell as administrator.
- Run the following script:$Farm = Get-SPFarm $CacheService = $Farm.Services | Where {$_.Name -eq "AppFabricCachingService"} $Account = Get-SPManagedAccount -Identity "Domain\ServiceAccountNamer" $CacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser" $CacheService.ProcessIdentity.ManagedAccount = $Account $CacheService.ProcessIdentity.Update()
- Get-SPWebApplication
- Cache settings operations in SharePoint Server 2013
- Configure object cache user accounts in SharePoint Server 2013
- SharePoint 2013 + Distributed Cache (AppFabric) Troubleshooting
- Changing the Distributed Cache Service Account
- AppFabric Caching (and SharePoint): Configuration and Deployment (Part 2)
- Use-CacheCluster
- Get-CacheHost
- SharePoint 2013: Critical Event 6398: The Execute method of job definition Microsoft.SharePoint.Administration.SPAppInstallationJobDefinition... threw an exception
- SharePoint 2013: The process was terminated due to an unhandled exception
- Get-SPServiceInstance
- Unprovision duplicate service instances in SharePoint 2013
- SharePoint 2013: Distributed Cache (AppFabrikCache) part 1/2
- SharePoint 2013: Distributed Cache (AppFabrikCache) part 2/2
- If you implement claims-based authentication, you must add the cache account claims user names to each web application's User Policy. You do this using PowerShell, and you must use the claims user name format as shown.
- By default, the distributed cache service is installed on each server to which you installed and configured SharePoint Server 2013. Thus, if you installed SharePoint Server 2013 first to an application server, this server will be the first to host a cache service instance. Now, if you are deploying a traditional topology (application server running most services and the CA web application and customer websites running on two or more WFEs), it is unnecessary to run the distributed cache service on the application server as it performs no useful customer function. Therefore, it can be safely removed from the application server(s) if you want to. If you are deploying SharePoint Server 2013 to more than three servers, you will definitely need to remove it from at least one of these.
- To avoid deploying Distributed Cache to a new farm server entirely, use the "-SkipRegisterAsDistributedCacheHost" parameter.
- It isn't absolutely necessary to remove the distributed cache running an application server. It will not adversely impact farm operation leaving it there.
No comments:
Post a Comment