Included in Telligent Community 6.0 is a distributed caching provider based on Microsoft's AppFabric Server components. Follow the steps below to configure a Telligent Community site to use the new provider.
AppFabric caching requirements
- Please see the basic Microsoft Windows AppFabric requirements before attempting to install the components.
- All machines in an AppFabric caching cluster must have the AppFabric components installed on them.
- The installation and setup instructions assume that AppFabric is not currently being used by other processes. If it is, then you must adjust values appropriately.
- It is Telligent's recommendation that you run AppFabric on a dedicated server to maximize performance.
- Download the Windows AppFabric Server component: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=467e5aa5-c25b-4c80-a6d2-9f8fb0f337d2
- At the "Features" step, ensure the Caching Services and Cache Administration check boxes are selected.
- Click Next.
- In the confirmation dialog, click Install.
- At the end of the installation, ensure that the Launch configuration tool check box is selected, and click Finish. This will launch the AppFabric configuration that will be used to finalize setup.
- Start the installation wizard, accepting defaults until the "Caching Service" step of the configuration.
- At the "Caching Service" step, select the Set Caching Service Configuration check box.
- If the machine is not part of a domain, configure the Windows account that AppFabric should use. If the machine is part of the domain, this value is ignored.
- Configure where setup information about the cache cluster should be stored:
- If this is the first node in a cluster (called the "host"), you must select where this information can be found. Select XML to store all configuration values in an XML file (which must be accessible by all nodes in the cluster). Alternatively, select SQL Server AppFabric Caching Service Configuration Store Provider.
- XML - Set the file share location where the XML configuration file will be stored. This location must be accessible by all nodes in the cache cluster.
- SQL - Click the Configure ... button and set values according to your environment.
- If this is a new node being added to an existing cluster, you should configure all values that were originally used when the host was created.
- Set the node type being added. If this is the first node in the cluster, select New cluster. Otherwise, if you are adding a node to an existing cluster, select Join cluster.
- If you select new cluster, you must set the cluster size. This value, once set, can never be changed. You can always add and remove nodes, and this option is only used for memory optimization. The value you select should be the realistic number of nodes you plan on using in your cluster.
- At the "Cache node" step of the configuration, accept defaults but also select Windows Server AppFabric: AppFabric Caching Service in the Windows Firewall exceptions.
- Click Finish.
- OPTIONAL: Disable security properties in AppFabric caching. Security setup is defined in the <securityProperties> node of your AppFabric setup, and can be modified using the PowerShell application that is installed with AppFabric.
To change security settings, open a PowerShell session using the shortcut installed by the AppFabric installer (Programs > Windows AppFabric Server > Caching Administration Windows Powershell).
Make sure your cluster is stopped, and issue a Set-CacheClusterSecurity command. For example:
PowerShell prompt> Stop-CacheCluster
PowerShell prompt> Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None
PowerShell prompt> Start-CacheCluster
- Open up services.msc and find the newly installed service for AppFabric named "AppFabric Caching Service". Ensure that the startup type is set to 'Automatic'.
- Start the cache node. Open a PowerShell session using the shortcut installed by the AppFabric installer (Programs > Windows AppFabric Server > Caching Administration Windows Powershell), and enter the command: Start-CacheCluster.
Your system is now ready to accept AppFabric cache commands.
Enable AppFabric in Telligent Community
- Once AppFabric is running, modify your web.config to match your environment's setup:
- In the <configSections>section, add the following definition:
type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- Add the <dataCacheClient> node right before </CONFIGURATION>. Ensure you update the highlighted items below to match your setup.
<host name="machine_name_running_AppFabric_caching" cachePort="22233"/>
<securityProperties mode="None" protectionLevel="None" />
- Add the provider to the cache stack (located in the caching.config file at the root of your Telligent Enterprise site). Ensure the listing is the last item (bottom-most) in the list of <cache> nodes. This means the AppFabric caching provider will be searched last when looking in cache for an item. For example:
<cache type="Telligent.Caching.AppFabric.AppFabricCache, Telligent.Caching.AppFabric" />
- OPTIONAL: By default, the AppFabric caching provider uses the default cache created when installing AppFabric. If this needs to be changed, you can modify the declaration added above to include a different named cache. To do this, add the child node <config cacheName="NewValue"></config> where NewValue is the value you want the provider to use. For example, to change from the default cache to one named "MyCache", your declaration may look like this:
<cache type="Telligent.Caching.AppFabric.AppFabricCache, Telligent.Caching.AppFabric">
When you finish, you can access the AppFabric Dashboard in IIS.
Microsoft AppFabric installation instructions: http://msdn.microsoft.com/en-us/library/ee790960.aspx