9. Configure AppFabric
Once you have installed the prerequisites on your Perception Application Server 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:
|
Create a UNC shared folder to place the caching details
To create a UNC folder share:
- Create a folder on your server. Choose a convenient location and name.
- Right-click on the folder, and select Properties from Windows Explorer
- Select the Sharing tab
- Click Share
- 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.
- Set the Permissions Level as Read/Write
- Click Share, followed by Close
Configure AppFabric using the AppFabric configuration wizard
The following settings need to be configured on the server hosting Enterprise Manager in this basic installation (i.e. your Perception server). To configure the caching service:
- Click Start | Windows Server AppFabric | Configure AppFabric
- On the Before you begin page, click Next
- On the Configure Hosting Services page, click Next (Perception does not use hosting services)
- On the Configure Caching Services screen, enable the Set Caching Services configuration check-box
- 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.
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.
- From the Caching Service configuration provider drop-down box, select XML
- In the File share text-box, enter the UNC address for the folder you created above. This will be in the format \\<UNC-Share-Name>
- Select New cluster
- Select the appropriate value from the Cluster size drop-down box. The value you select will be determined by the number of computers you are going to have in your cluster, which in turn is dependant on which components are installed. Questionmark recommends that you set this to Small Cluster (1-5) unless you are installing a load-balanced system with over 5 machines.
- Click Next
- Make sure you have defined the appropriate ports for AppFabric. You will need to use the default ports for Questionmark Perception.
Cache port: 22233
Cluster port: 22234
Arbitration port: 22235
Replication port: 22236
The Cache port needs to be accessible by the application and the other AppFabric servers, if more than one.
The Cluster port, Arbitration port, and Replication port need to be open between the AppFabric servers, if more than one.
- Click Next, followed by Finish
Setup the cache
To setup the required cache, we will use PowerShell. To do this using PowerShell:
- 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. - 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:
Stop-CacheCluster
- 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.
Now you need to start the cache by entering the following command:
Start-CacheCluster
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: Click Start | Windows Server AppFabric | Cache Administration PowerShell Console 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 10 using the link below.