Installation (Velocity)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Microsoft project code named "Velocity" supports many cache configurations. You can install the cache host service on a variety of computers, from development workstations, to existing Web or application servers, to a stand-alone group of dedicated cache servers. Although this topic describes a very simple scenario, many of the steps apply to all deployment scenarios.

Deployment Options

This scenario presented in this topic describes a three-computer installation that could be extended to support as many servers as needed. To add each additional cache server, repeat the installation of "Velocity" on CacheServer1 and then grant permissions to each cluster configuration storage location. Be sure to specify the same cluster name for all servers that you want to join the cluster.

For development purposes, you could also deploy a minimal single-computer installation. To deploy a single-computer installation, perform all the same steps but on a single computer.

This scenario also demonstrates the installation of an XML-based cluster configuration. Alternatively, you can also store cluster configuration settings in a SQL Server Compact data file or a SQL Server database. For more information about how to select the option that is right for you, see Configuration Options (Velocity).

Note

Microsoft Windows XP, Microsoft Windows Server 2003, and the 32-bit version of Microsoft Windows Vista do not allow more than 10 concurrent connections to a shared network folder. We do not recommend that you use these operating systems to store the cache configuration settings for large clusters.

Server Overview

The scenario presented in this topic is for a one-host cluster with an XML-based cluster configuration format. The servers described in this example and shown in the following diagram include a cache server named CacheServer1, a file server named FileServer1, and a development workstation named Dev1. It is assumed that all these servers have network access to each other and are members of a common domain, referred to in this example as TestDomain.

Dd187314.c9ed06b3-e8f0-424b-ae79-362ec634085e(en-us,MSDN.10).gif

CacheServer1

Run the "Velocity" installation program on this server to install the cache host service. It is referred to as the cache server because it runs the cache host service. For the purposes of testing, this server can be any computer that is running a current Microsoft client or server operating system.

To add more cache servers to the cluster, repeat the installation on other computers and use the same cluster name and cluster configuration storage location.

FileServer1

This server hosts a standard shared folder for the cluster configuration storage location. Because this example uses the XML-based cluster configuration format, a shared folder is required.

Note

A shared folder is also needed if you choose the SQL Server Compact-based cluster configuration format. If you choose SQL Server for cluster configuration storage, you will have to provide a SQL Server database instead.

Dev1

This is the development workstation, running a current Microsoft client operating system with Visual Studio installed. The scenario described in this document assumes that you do not install the cache host service here.

Deployment Overview

The installation scenario includes the following steps:

  1. Install the CacheServer1 prerequisites.

  2. Prepare the cluster configuration storage location.

  3. Configure the firewall exceptions.

  4. Install "Velocity" on CacheServer1.

  5. Start the cache cluster.

  6. Prepare the development environment.

Each of these steps is described in more detail in the following sections.

Install the CacheServer1 Prerequisites

Install the following prerequisites on CacheServer1:

  • Microsoft .NET Framework 3.5 SP1.

  • Microsoft PowerShell 1.0.

Prepare Cluster Configuration Storage Location

Create a shared folder on FileServer1 for the cluster configuration storage location. For the purposes of this example, name the shared folder ClusterConfigShare1 so that it can be accessed by the path \\FileServer1\ClusterConfigShare1. Grant read and write permissions to the domain account for the CacheServer1 server, TestDomain\CacheServer1$.

Note

For this pre-release version, it is a known issue that the Everyone identity may have to be granted read and write permissions to the cluster configuration storage location.

Configure Firewall Exceptions

Create firewall exceptions on CacheServer1. Refer to the operating system help for instructions.

  • On CacheServer1, open ports 22233, 22234, and 22235. These ports are the installation default values for the cache, cluster, and arbitration ports, respectively. Alternatively, post-installation, you may configure firewall exceptions based on the program name, DistributedCache.exe.

Install "Velocity" on CacheServer1

Install the cache host service on CacheServer1 by running the "Velocity" installation program. For more information, see the step-by-step instructions in the code_name_velocity_readme.txt file that is included on the same download page as the installation program for "Velocity." During the Cache Host configuration step, use the following configuration values:

  • Provider: XML-based file.

  • Network Share Path (Cluster Configuration): Use the path to the shared folder created on FileServer1, \\FileServer1\ClusterConfigShare1. If you do not know the full path, you can type the server name, for example \\FileServer1, and then use the Browse button to navigate to the specific folder on the server.

  • Cluster Name: For this example, use the name "ClusterName1".

  • Cluster Size: Select the smallest option.

  • Cache Port Number: Use the default value provided: 22233.

  • Cluster Port Number: Use the default value provided: 22234.

  • Max Server Memory: Use the default value provided.

Note

The Arbitration port number is always the cluster port number plus one. For more information about the TCP ports that are used by "Velocity," see General Concepts (Velocity), and Troubleshooting (Velocity).

Start the Cache Cluster

On CacheServer1, become familiar with the PowerShell-based cache administration tool and create a named cache by running the following commands:

  1. Open the PowerShell-based cache administration tool console from the shortcut that was installed on the desktop of the cache server.

    Note

    On Microsoft Windows Vista and Microsoft Windows Server 2008 operating systems, you will have to right-click the "Velocity" PowerShell shortcut and select Run as administrator for the cache administration tool to work correctly.

  2. View the status of the service (see whether the service is stopped): get-cachehost

  3. Start the cluster by typing start-cachecluster

  4. View the status of the service (see that the service is running): get-cachehost

  5. View the cache running on the cluster: get-cache

  6. Create a named cache called NamedCache1, with high availability enabled: new-cache -CacheName NamedCache1 -Secondaries 1

  7. View the cache running on the cluster (see NamedCache1): get-cache

Note

These commands are not required for the cache to work, but provide an introduction to the PowerShell-based cache administration tool. For more information about the cache administration tool commands, see Cache Administration with PowerShell (Velocity).

Prepare the Development Environment

In order to begin to develop cache-enabled applications, you must prepare the Dev1 development environment by copying the necessary assemblies from CacheServer1 and setting references to those assemblies in your Visual Studio project. For more information, see How to: Prepare the Development Environment (Velocity).

After these steps are completed, you will have a one-host cache cluster and a development workstation ready for configuring the cache client and writing cache-enabled applications. For more information, see Using Basic Cache Methods (Velocity).

See Also

Tasks

How to: Prepare the Development Environment (Velocity)

Concepts

Configuration (Velocity)
Troubleshooting (Velocity)
Cache Administration with PowerShell (Velocity)

Other Resources

Cache Concepts (Velocity)
Programming Guide (Velocity)