Included in the Telligent product is a distributed caching provider based on Microsoft's AppFabric Server components. Follow the steps below to configure an application to use the new provider.
Telligent Community 7.0 incorporates Windows Server AppFabric caching, a technology used to enhance system performance by distributing system cache over different servers. Windows Server AppFabric is Telligent's officially supported distributed cache.
In AppFabric caching, data items stored in memory can be called independently of the system database. The net effect of caching is to remove database bottlenecks and improve system performance. (For general information about AppFabric, refer to the Microsoft documentation.)
Because Windows Server AppFabric is based on IIS, it maps well into the concept of a Web farm. Conceptually, AppFabric security must be configured properly at a domain level before configuring AppFabric on a Web farm. If you are familiar with configuring Web farms, you should be able to follow Microsoft's guidelines for enabling AppFabric caching on your Web farm.
For full architecture information: http://msdn.microsoft.com/en-us/library/ee677374.aspx
Here is a summary of situations in which to apply AppFabric within your Web Farm:
Please see following url for full architecture information:
Scenario 1: 1 Web server, 1 database server
In this configuration, all .NET Framework 4 WCF/WF services are managed on one AppFabric hosting and management server. The persistence and monitoring databases exist on a separate server running SQL Server. Multiple clients access the .NET Framework 4 WCF/WF services through the single AppFabric hosting and management Web server.
Scenario 2: n Web servers, 1 database server
For load balancing to work effectively on an AppFabric Web farm, the configuration on all the AppFabric servers in the cluster must appear identical to clients. Each cluster server should contain the same .NET Framework 4 WCF/WF services and inherit the same configuration settings.
All servers share the same SQL Server monitoring and persistence databases. This means that all display the same configuration and data within the AppFabric user interface. Because all have the same applications, configuration, and databases, all computers will display the same monitoring metrics in their AppFabric Dashboard and related Tracked Events, Persisted WF Instances, and Tracked WF Instances pages.
Scenario 3: n web servers, m service machines*, 1 database server
The above diagram shows a load-balanced AppFabric Web farm cluster that uses the AppFabric caching server to store ASP.NET session state. This caching cluster is a separate logical cluster from the AppFabric hosting and management Web farm cluster. In the diagram, all computers in the AppFabric caching server cluster access either the SQL Server configuration store, or the Windows Server XML cache configuration store - but not both.
AppFabric caching requirements
Please see the basic Microsoft Windows AppFabric requirements and installation instructions 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 Microsoft AppFabric 1.1 for Windows Server : http://www.microsoft.com/en-us/download/details.aspx?id=27115
At the "Features" step, ensure the Caching Services and Cache Administration check boxes are selected.
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.
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.
Locate the client .dlls installed with AppFabric and copy them into your \bin directory (or other location if you are not running inside a web site). If you are running your application on a different machine than you installed AppFabric Server on (which is the most common setup), you can either copy the .dlls directly from the server (by default, the assemblies are placed in .\Windows\Sytem32\AppFabric) or run the AppFabric installer above, select "Cache Client" under "Features", and copy the .dlls from the installed directory.
Ensure the following assemblies are included in your application:
Once AppFabric is running, modify your web.config (or, if you are not using the provider in a web application, the appropriate application configuration file) to match your environment's setup:
In the <configSections>section, add the following definition:
type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=184.108.40.206, 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 hierarchy (located in the caching.config file at the root of your site or application). 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 <cacheName>NewValue</cacheName> 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">