+ All Categories
Home > Technology > Distributed cache service

Distributed cache service

Date post: 24-Dec-2014
Category:
Upload: prajeeshprathap
View: 634 times
Download: 5 times
Share this document with a friend
Description:
 
15
©2012 Microsoft Corporation. All rights reserved. DISTRIBUTED CACHE SERVICE – SHAREPOINT 2013 Prajeesh Prathap 1
Transcript
Page 1: Distributed cache service

1©2012 Microsoft Corporation. All rights reserved.

DISTRIBUTED CACHE SERVICE –

SHAREPOINT 2013Prajeesh Prathap

Page 2: Distributed cache service

2

ASP.NET CACHE VS. DISTRIBUTED CACHE Synchronize multiple cache copies Application pool recycle causes data loss Limited cache size OutProc synchronization increase network

latency and scalability issues

Page 3: Distributed cache service

3

DISTRIBUTED CACHE SERVICE – SHAREPOINT Built on top of Windows Server AppFabric

which implements the AppFabric Caching ServiceInstalls with the prerequisites for SharePoint 2013Stores serialized managed objects in a Cache Cluster

Provides in-memory caching services to features in SharePoint 2013 likeNewsfeedsAuthenticationOneNote client accessSecurity TrimmingPage load performance

Page 4: Distributed cache service

4

PHYSICAL ARCHITECTURE Cache hosts Cache cluster Cluster configuration

storage location XML file SQL server Custom provider

Cache client

Page 5: Distributed cache service

5

LOGICAL ARCHITECTURE Named cache Application specific Max 128 named caches Stored in configuration,

retains after restarting the cache service

Regions Created at runtime in

application code More retrieval options

other than by key Limited to single cache

host (No scalability)

Cached objects

Page 6: Distributed cache service

6

INSTALLATION

Default provisioning done by SharePoint setup. Every server becomes part of the cache cluster except the DB server

The Windows service AppFabric Caching Service is installed on each server on the farm

The ConfigDB keeps track of all servers running the cache service

Page 7: Distributed cache service

7

CACHES THAT DEPEND ON DISTRIBUTED CACHING SERVICEName Cache name Description

Login Token Cache

DistributedLogonTokenCache

This cache stores the security token issued by a Secure Token Service for use by any web server in the server farm. Any web server that receives a request for resources can access the security token from the cache, authenticate the user, and provide access to the resources requested.

Feed Cache DistributedActivityFeedCache

This cache stores activities and conversations for use by the feeds on a user's My Site.

Last Modified Time Cache

DistributedActivityFeedLMTCache

This cache stores time stamp information for all Feed Cache entities

OneNote Throttling

DistributedBouncerCache

Access Cache DistributedAccessCache

Search Query Web Part

DistributedSearchCache

Security Trimming Cache

DistributedSecurityTrimmingCache

App Token Cache

DistributedServerToAppServerAccessTokenCache

View State Cache

DistributedViewStateCache

Default Cache DistributedDefaultCache This cache can be used by any feature.

Page 8: Distributed cache service

8

PLANNING

Dedicated mode vs. collated mode Runs on all WFE’s and APP servers by default. Recommended to switch to dedicated mode when

you have over 10000 users. Microsoft recommends that you avoid running the

following services/applications on servers where the Distributed Cache service is in operation:

SQL Server 2008 or SQL Server 2012 Search Service Excel Services Project Server Services

Page 9: Distributed cache service

9

PLANNING

Can be started or stopped from Central Admin or using PowerShell

Default installation setup to use 10% of the server’s physical memory

Half of the memory is used for data storage and half is used for memory management overhead

Max RAM recommended per server is 16GB and not less than 8GB

Increasing memory on server does not update the Cache size Stop the cache service on all hosts Update-SPDistributedCacheSize Restart the cache service on all hosts.

Recommendation is to dedicate 2GB for operating system and rest for Cache Service in dedicated mode.

Page 10: Distributed cache service

10

PLANNING

Servers can be added/ removed to the cache cluster using PowerShell

Add-SPDistributedCacheServiceInstance Remove-SPDistributedCacheServiceInstance To prevent data loss associated with the removal of the

cache service, administrators should run the graceful shutdown procedure before removing the cache service.

Stop-SPDistributedCacheServiceInstance -graceful Remove-SPDistributedCacheServiceInstance

Page 11: Distributed cache service

11

PLANNING

The farm account is used as the service account for cache service.

After installation you should lower the privileges of the account

Changing service account using PowerShell$farm = Get-SPFarm$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}$accnt = Get-SPManagedAccount -Identity domain_name\user_name$cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"$cacheService.ProcessIdentity.ManagedAccount = $accnt$cacheService.ProcessIdentity.Update() $cacheService.ProcessIdentity.Deploy()

Page 12: Distributed cache service

12

PLANNING

Firewall configuration Runs on the following ports

22233 22234 22235 22236

Dynamic memory is not supported in SharePoint 2013 environments

Page 13: Distributed cache service

13

PERFORMANCE COUNTERS

Exposed via developer’s dashboard. Help in determining whether we need

additional Cache Servers, CPU, or increase in the size of the memory, higher throughput I/O, better disks, etc.

Number of reads, number of writes, number of hits and number of misses

Time to read, time to write Total I/O (how much data has been transferred in a given

period of time)

Page 14: Distributed cache service

14

HEALTH RULES

Availability One of the cache hosts in the cluster is down. We might have

to restart the service on this box Cache host is in throttled state. Which means we have

availability issues, we may need to restart it The high availability node for SharePoint distributed cache is

not available – happens when there are less than 2 servers running the cache service

Configuration Firewall client settings on the cache host are incorrect. Which

means the Cache Host can’t be contacted There exists at least one cache host in the cluster, which SP

doesn’t know about – happens when the cache service is disabled in SharePoint but AppFabric Caching Service is running on the machine

Cached objects have been evicted – indicates eviction happened across the cache cluster. Not bad in and of itself but may be a clue if it happens frequently and/or there are performance issues

Page 15: Distributed cache service

15©2012 Microsoft Corporation. All rights reserved.

THANK YOU


Recommended