2e. Configure AppFabric | Questionmark

2e. Configure AppFabric

Applies to the following products: 
Questionmark Perception
Applies to the following Perception versions: 
Perception 5.4

Once you have installed a database for the ETL_Temp database on your ETL server, you need to configure AppFabric.

AppFabric works by creating a distributed cache that is shared by the various servers that need it. This can speed up access to frequently accessed information such as session data.

To configure AppFabric, you will need to:

Allow access to AppFabric through the Firewall

AppFabric is installed as a service. The AppFabric service needs to be granted permission to send data through the firewall. This can be done in Windows Server 2008 by modifying the In and Outbound Rules. To modify the rules:

  • Navigate to Start | Administrative Tools | Windows Firewall (in Windows Server 2008 R2, this will be Windows Firewall with Advanced Security)
  • Select Inbound Rules from the tree menu on the left
  • In the Inbound Rules pane, locate AppFabric Caching Service (TCP-In)
  • Right-click on it, and select Properties
  • On the General tab, select the Enable check-box
  • Select the Advanced tab, and make sure that the Domain, Private and Public check-boxes are selected
  • Click OK
  • Now select Outbound Rules from the tree menu on the left
  • In the Outbound Rules pane, locate AppFabric Caching Service (TCP-Out)
  • Right-click on it and select Properties
  • On the General tab, select the Enable check-box
  • Select the Advanced tab, and make sure that the Domain, Private and Public check-boxes are selected
  • Click OK

Play Video

Create a UNC shared folder to place the caching details

To create a UNC folder share:

  1. Create a folder on your server. Choose a convenient location and name.
  2. Right-click on the folder, and select Properties from Windows Explorer
  3. Select the Sharing tab
  4. Click Share
  5. The File Sharing window displays. Add the user Network Service or a local user if you are not connected to a domain. If you are setting up a load-balanced environment, ensure each node has the same username/password.
  6. Set the Permissions Level as Contributor (Read/Write on Windows Server 2008 R2)
  7. Click Share, followed by Close
Configure AppFabric using the AppFabric configuration wizard

Because you are setting up Perception in a load-balanced environment, you should follow the Microsoft best practices for setting up AppFabric caching.

These best practices include:

To create a load-balanced environment, complete the steps in the sections above on Server 1 (the first node in the load-balanced setup), and then repeat the following steps on each subsequent node:

  1. Click Start | Windows Server AppFabric | Configure AppFabric
  2. On the Before you begin page, click Next
  3. On the Configure Hosting Services page, click Next (Perception does not use hosting services)
  4. On the Configure Caching Services screen, enable the Set Caching Services configuration
  5. Set a Caching Service account. 

    If your computer is part of a domain, you cannot change the Caching Service account from the default of "Network Service." If your computer is part of a domain, you should follow the following best practices from Microsoft to configure the credentials correctly to get around this limitation (see Shared Folder-Based Cluster Configuration (Windows Server AppFabric Caching) for more information):

    "To simplify long-term administration of the cluster configuration folder, do not run the cache service under the credentials of a domain user account. By using the default installation settings, you can use the domain computer accounts of the cache servers instead and avoid password maintenance.

    If you create a Windows security group to manage access to the cache configuration shared folder, you set up permissions on that folder only once. For example, if the Windows security group is named ClusterACacheServers, it indicates that the cache servers have permission to become part of the cache cluster named ClusterA.

    After you create the ClusterACacheServers security group, grant the domain computer accounts of the applicable cache servers membership to this group (for example,"domain\computername$"). Then grant ClusterACacheServers read and write permissions in the sharing and security settings of the cluster configuration shared folder. When this is set up, for each new server that you add to the cache cluster, add only the domain computer account of the new server to the security group."

    If your computer is part of a workgroup, you must change the Caching Service account from "Network Service" and use a local account.

    If you are using a local account, do not use an account with administrator privileges. The local account used for the Caching Service account only needs the right to generate security audits (granted explicitly by adding the account to the policy in the Local Security Policy dialog box) and the right to bypass traverse checking (granted through membership in the Everyone group). If you are in a load-balanced environment, all the servers should be setup with the same username/password.

  1. From the Caching Service configuration provider drop-down box, select XML
  2. In the File share text-box, enter the UNC address for the folder you used on Server 1
  3. Select Join cluster
  4. Click Next
  5. Make sure you have defined the appropriate ports for AppFabric

  6. Click Next, followed by Finish

Repeat this process for each of the servers in the load-balanced environment.

Setup the cache

To setup the required cache, we will use PowerShell. To do this using PowerShell:

  1. On the Start Menu, click All Programs, Windows Server AppFabric, and then click Caching Administration Windows PowerShell
    Please note you have to start PowerShell as an administrative user. If you are not already logged in as an administrator, right-click the PowerShell icon and select Run as administrator.
  2. We will not be using the security system provided by AppFabric. Instead we will be using the Perception equivalent, so you will need to enter the following command:

    Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None

    If you receive an error when running the Set-CacheClusterSecurity command, stop the cache cluster and then try again by entering the following before trying step 2 again:


  3. Now create a new cache by entering the following command:

    New-Cache questionmark

    Please note that the cache name is case sensitive and must be called questionmark.

  4. Now you need to start the cache by entering the following command:


Starting the cache after a server reboot

Every time you restart your Perception server, you will need to restart the cache on each computer. It is recommended that you do this through PowerShell by following the steps below:

  1. Click Start | Windows Server AppFabric | Cache Administration PowerShell Console
  2. Enter the following:


If you are using SQL Server as your cache configuration provider, you can also change the Startup Type in Services for AppFabric to Automatic, although it can take ten to fifteen minutes for AppFabric to restart after a reboot through this method.

If you are using XML as your cache configuration provider or the delayed start is not acceptable for your purposes, you can use a PowerShell script and a scheduled Windows task to start AppFabric automatically. See the Knowledge Base article How can I automatically start the Windows Server AppFabric Caching Service? for instructions on how to do this.

After you have completed the above steps, continue on to step 2f using the link below.