How to make SharePoint 2013 Distributed Cache service Semi High Available

Introduction

The Distributed Cache service provides caching features in SharePoint Server 2013. The Distributed Cache service is built on Windows Server AppFabric, which implements the AppFabric Caching service. Windows Server AppFabric installs with the prerequisites for SharePoint Server 2013. This is how Microsoft defined the Distributed Cache service but what is depend on the Distributed Cache service ?

Table: Different caches that depend on the Distributed Cache service

Name 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

as you can see the Distributed Cache service is very important to your SP2013 farm and without it SP will not functional will.

Dedicated or Collocated Mode

The Distributed Cache service can run in dedicated or collocated mode. When running in dedicated mode, the Distributed Cache service is started and all other services are stopped on the server. In collocated mode, the Distributed Cache service is running along with other services on the server. lately Steve Peschka write a great blog post about that you need to run yours Distributed Cache service on the dedicated mode and informed us that this is a best practice Dedicating Servers to Distributed Cache in SharePoint 2013

Appfabric Cache is High Available but Distributed Cache service is not

Even if the Distributed Cache service is built upon the Appfabric Cache but its not high available which mean that if your server host DCS goes down all your cache will go. This is why you need to run
Stop-SPDistributedCacheServiceInstance –Graceful
with the –Graceful parameter if you want to stop the service in one of the its servers so the cache can be copied to other server hosting the DCS in your farm

Capacity planning for the Distributed Cache service

The following table lists different memory and architecture recommendations for the Distributed Cache service, depending on the total number of users.

Deployment size Small farm Medium farm Large farm

Total number of users

< 10,000

< 100,000

< 500,000

Recommended cache size for the Distributed Cache service

1 GB

2.5 GB

12 GB

Total memory allocation for the Distributed Cache service (double the recommended cache size above)

2 GB

5 GB

24 GB

Recommended architectural configuration

Dedicated server or co-located on a front-end server

Dedicated server

Dedicated server

Minimum cache hosts per farm

1

1

1

So How to make it Semi High Available

even if the above table mentioned that the minimum cache hosts per farm is 1 server my recommendation is that you need at least 2 servers runs only the DCS ( in Dedicated Mode) so if one if it goes down your farm can still be working with the other server.

finally the below diagram show how the office division implement their SP2013 farm

The_Microsoft_Office_Division_s_SharePoint_Server_2013_farm

http://go.microsoft.com/fwlink/p/?LinkId=286957

as you can see they use 2 servers with 14 GB RAM each.

Advertisements

About Mahmoud Hamed

SharePoint Evangelist, Architect, Developer
This entry was posted in SharePoint 2013 and tagged , . Bookmark the permalink.

7 Responses to How to make SharePoint 2013 Distributed Cache service Semi High Available

  1. Nik Patel says:

    It’s not recommended to allocate more than 16 GB RAM to Distributed Cache Server.. In your table where Total memory allocation for the Distributed Cache service is 24 GB, I would change it to 16 GB… See this from TechNet => On a server that has more than 16 GB of total physical memory, allocate a maximum of 16 GB of memory to the Distributed Cache service. If you allocate more than 16 GB of memory to the Distributed Cache service, the server might unexpectedly stop responding for more than 10 seconds, http://technet.microsoft.com/library/jj219572%28office.15%29.aspx

  2. Nik Patel says:

    Great article and great notes…

  3. Nik, you are right you can’t add more than 16 GB to the same DCS sever but the table ilustrate how much ram you need in the whole farm so if you need more than 16 GB you need to split this to multiple servers

  4. Jason A Ramsey says:

    /Random: what generated that farm diagram at the bottom of your post!? I want that… 🙂

  5. Pingback: No-nos, Gotchas, Warnings, and Best Practices for SharePoint 2013 Distributed Cache Service | Nik Patel's SharePoint World

  6. Aroh says:

    Great Post and easy to understand the concepts..

  7. Marek Sarad says:

    Finally moving to SP2013 and I have question with regards to the set up of the DistCache, in the Diagram loadbalancing is mentioned. If you run 2 DistCache servers in dedicated mode do you need to employ additional LoadBalancer above the built-in SharePoint discovery and balancing service?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s