Set the Cluster Management Role and Lead Host Designations (Windows Server AppFabric Caching)
Windows Server AppFabric offers two options for performing the cluster management role in the distributed cache cluster. If you store your cluster configuration settings in a SQL Server database, you have the choice of letting that same instance of SQL Server perform the cluster management role or letting the lead hosts do the job. This topic provides a general overview of how to set the cluster management role. For more information about the role, see Lead Hosts and Cluster Management (Windows Server AppFabric Caching).
Note
If your cache cluster does not use SQL Server to store the cluster configuration settings, lead hosts must always perform the cluster management role.
This procedure assumes that you have a running cache cluster and that you are using a SQL Server database to store cluster configuration settings. By default, SQL Server will already be performing the cluster management role at the time of the first cache server installation. You need to follow this procedure only if you wish to change this setting.
To change this cluster management role, you need to export the cluster configuration setting to an XML file and edit the corresponding XML attribute value. This setting is specified with the leadHostManagement
attribute of the partitionStoreConnectionSettings
element. The partitionStoreConnectionSettings
element is a child of the advancedProperties
element, which is a child of the dataCache
element. At the same time, you may also want to change which cache hosts are designated as lead hosts, as defined by the leadHost
attribute. For more information about settings, see Cluster Configuration Settings (Windows Server AppFabric Caching).
To set the cluster management role and lead host designations
From the Windows PowerShell-based cache administration tool, export the cluster configuration settings with the
Export-CacheClusterConfig
command. For more information about using Windows PowerShell, see Using Windows PowerShell to Manage Windows Server AppFabric Caching Features.Open the XML-based cluster configuration file that was exported in the previous step.
Locate and edit the
leadHostManagement
attribute in thepartitionStoreConnectionSettings
element, which is a child of theadvancedProperties
element. Setting it totrue
means that the cache hosts designated as lead hosts will perform the cluster management role. Setting it tofalse
means that the instance of SQL Server where the cluster configuration database is stored will perform the cluster management role.(Optional) Specify additional or different cache hosts as lead hosts. To designate a cache host as a lead host, locate the appropriate
host
element corresponding to the cache host. Change theleadHost
attribute of thehost
element as desired. Setting it totrue
means that the cache host will perform the cluster management role whenleadHostManagement
istrue
. Setting it tofalse
means that the cache host will never perform the cluster management role.Save the XML-based cluster configuration file that was edited.
Stop the cache cluster if it is running with the
Stop-CacheCluster
. Note: This will flush all data out of the cache cluster.Use the
Import-CacheClusterConfig
command to import the XML-based cluster configuration file that was edited in steps 3 and 4.Start the cache cluster with the
Start-CacheCluster
command for the new configuration settings to take effect.
See Also
Concepts
Edit Cluster Configuration Settings (Windows Server AppFabric Caching)
Edit Cache Configuration Settings with Windows PowerShell (Windows Server AppFabric Caching)
Cluster Configuration Settings (Windows Server AppFabric Caching)
Using Windows PowerShell to Manage Windows Server AppFabric Caching Features
Windows Server AppFabric Caching Configuration Options
Windows Server AppFabric Caching Concepts
Configuring the Cache Cluster (Windows Server AppFabric Caching)
Using Configuration Methods (Windows Server AppFabric Caching)