Cache Host Configuration Settings

Microsoft AppFabric 1.1 for Windows Server cache host settings are stored in two places: at the cluster level in the cluster configuration settings and at the cache host level on each individual cache host.

Cluster-Level Cache Host Settings

The cache host settings stored at the cluster level are related to how the cache host performs as a participant in the cluster, for example, the memory consumption and network port settings for communication. These cluster-level cache host settings are discussed in Cluster Configuration Settings.

Most cluster-level settings are also available to the Windows PowerShell-based cache administration tool for viewing and editing. For more information, see Using Windows PowerShell to Manage AppFabric 1.1 Caching Features.

Host-Level Cache Host Settings

The cache host settings stored on each cache host are functional and are related to settings required for the software to run; for example, they set where the cache host can find the cluster configuration storage location and how log sinks should be configured.

To store cache host settings, each cache host uses a configuration file that is named DistributedCacheService.exe.config. This file is automatically created and configured during installation, and is located in the ".\Program Files\Windows Server AppFabric" folder. The settings that are used in this configuration file should not be edited in most cases. The only time that you may have to edit this file is to set the logging level or change the log location.

Note

Other settings found in the DistributedCacheService.exe.config file that are not described here are used by AppFabric for internal operations.

dataCacheConfig Element Settings

The settings in the dataCacheConfig element are meaningful to the cache host with regard to the cache cluster. Settings such as the cluster name, cluster configuration storage location, and the name of the cache host service can be found in the dataCacheConfig element.

The settings in the dataCacheConfig element, outlined in the following table, are also used by the PowerShell administration tool when you use the Use-CacheCluster command with no parameters. For more information, see Using Windows PowerShell to Manage AppFabric 1.1 Caching Features.

Setting XML Configuration Location

Cache server name

The hostName attribute of the dataCacheConfig element.

Cluster configuration location connection string

The connectionString element of the clusterConfig element. The clusterConfig element is a child of the dataCacheConfig element.

Note

When you use a SQL Server database to store cluster configuration settings, the SQL Server connection string is stored in clear text in the DistributedCacheService.exe.config file. Whenever possible, use Windows integrated security to secure the database so that passwords are not required in connection strings.

Example

The following example shows what the cache host configuration file, DistributedCacheService.exe.config, looks like.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- Microsoft.ApplicationServer.Caching.Core assembly name is hard-coded -->
    <section name="dataCacheConfig" type="Microsoft.ApplicationServer.Caching.DataCacheConfigSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <section name="fabric" type="Microsoft.Fabric.Common.ConfigFile, Microsoft.WindowsFabric.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere" />
    <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </configSections>
  <dataCacheConfig cacheHostName="AppFabricCachingService">
    <log location="" logLevel="-1" />
    <clusterConfig provider="System.Data.SqlClient" connectionString="Data Source=SqlServer1;Initial Catalog=CacheConfigDB;Integrated Security=True" />
  </dataCacheConfig>
  <fabric>
    <section name="param" path="">
      <key name="VersionInfoClass" value="Microsoft.ApplicationServer.Caching.ServerVersionInfo, Microsoft.ApplicationServer.Caching.Server" />
      <key name="DroppedReplicaKeepDuration" value="0" />
      <key name="ClusterStableNodeUpInterval" value="10" />
      <key name="ReplicationQueueCapacity" value="128" />
      <key name="CopyQueueCapacity" value="2" />
      <key name="ReplicationTempListCapacity" value="1024" />
      <key name="ReplicationTempListInitialSize" value="128" />
      <key name="ReplicationRetryInterval" value="12" />
      <key name="ThrowOnAssert" value="true" />
    </section>
  </fabric>
  <dataCache size="Small">
    <hosts>
      <host replicationPort="22236" arbitratorPort="22235" clusterPort="22234" hostId="1739552749" size="1228" leadHost="true" account="NT AUTHORITY\NETWORK SERVICE" name="localhost" cacheHostName="AppFabricCachingService" cachePort="22233" />
    </hosts>
  </dataCache>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
  <startup>
    <supportedRuntime version="v4.0.30125" />
  </startup>
</configuration>

See Also

Concepts

Application Configuration Settings (AppFabric 1.1 Caching)
Cluster Configuration Settings
Troubleshooting AppFabric Caching
Using Windows PowerShell to Manage AppFabric 1.1 Caching Features
AppFabric Caching Concepts (AppFabric 1.1 Caching)
Developing a Cache Client

  2012-09-12