Jagamisviis:


Configure AppFabric

You can configure Microsoft AppFabric 1.1 for Windows Server by running a configuration wizard either immediately after successfully running the setup wizard, or by executing the configuration wizard from the Start menu after initial installation. The configuration wizard overwrites existing configuration values with any new values that you enter in the wizard.

Many of the steps that are performed in the configuration wizard can be performed manually by executing AppFabric configuration cmdlets. For more information, see the Windows Server AppFabric help (https://go.microsoft.com/fwlink/?LinkId=164929).

You can set the following configuration in the configuration wizard, based upon which features you have installed in the setup wizard:

  • Configure the accounts for the Event Collection service and the Workflow Management service.

  • Add the default configuration entries for the monitoring and persistence stores to the root Web.config file.

  • Initialize the default monitoring and persistence stores.

  • Configure a Caching Service configuration database, creating a new cache cluster or joining an existing cache cluster.

The configuration wizard sets the configuration of the Hosting Services feature in the root Web.config file. The wizard sets the configuration of the Caching Service in the DistributedCache.exe.config file located in the ".\Program Files\ Microsoft AppFabric 1.1 for Windows Server " folder. The DistributedCacheService.exe.config file contains a connection string for the Caching Service configuration information. If you select XML for the Caching Service configuration provider, the cluster configuration will be set in an .xml file in a folder that you designate during configuration; otherwise, the cluster configuration is set in a store determined by the Caching Service configuration provider, as configured in the wizard.

Note

If your services use custom behaviors or bindings, you will not be able to configure these settings in AppFabric directly. This is because AppFabric uses MWA configuration API (native to IIS) to read/write configuration. If you want to be able to configure them, you will need to convert these custom element sections to MWA-compatible schemas and place that schema in %SystemRoot%\System32\inetsrv\config\schema. MWA will automatically pick up this schema and parse the custom section in configuration correctly. You can then edit these configuration sections using IIS’s native configuration editor (IIS Configuration Editor) that ships inside of IIS Manager, not the AppFabric Configuration Editor.

For more information about installation, see Install AppFabric.

Start Configuration of Microsoft AppFabric 1.1 for Windows Server

  1. Open the AppFabric Configuration Wizard after performing the AppFabric Setup Wizard by selecting the Launch configuration tool check box on the Installation Results page of the setup wizard, and then clicking Finish to complete the setup wizard.

  2. You can also open the configuration wizard by clicking Start, clicking All Programs, clicking Microsoft AppFabric 1.1 for Windows Server, and then clicking Configure AppFabric.

  3. On the Before You Begin page, select Yes to participate in the Customer Experience Improvement program, or No not to participate, and then click Next. The Configure Hosting Services page will be displayed. Proceed to the next section of this topic.

    Note

    If you participate, this program helps Microsoft improve Microsoft AppFabric 1.1 for Windows Server. Without interrupting you, it collects information about your computer hardware and how you use Microsoft AppFabric 1.1 for Windows Server. The program also periodically downloads a file to collect information about problems you might have with Microsoft AppFabric 1.1 for Windows Server. The information collected is not used to identify or contact you.

Configure Monitoring

  1. On the Configure Hosting Services page, use the tables below to configure monitoring, and then click Next.

    Note

    If Hosting Administration is installed, but Hosting Services is not installed, then the services for the AppFabric Event Collection service and the Workflow Management service are not installed, and the text boxes for the identities of the services will display “Service not installed”.

    Control Description

    Set monitoring configuration

    Select to select the Event Collection service account, and to select and configure the monitoring store.

    AppFabric Event Collection service account

    Displays the Windows logon account for the Event Collection service. By default, the Event Collection service account is used for the monitoring provider. The Event Collection service account is a member of the Administrators group, and has administrative access to the monitoring database. The default is NT Authority\LocalService.

    Change

    If you click Change for the Event Collection service account, you will be able to select the user credential for system services. You can select a built-in account or enter a custom user name and password. In the Select User dialog box, select the account that you want to use for the service, and then click OK. Doing so will update the identity (if it was changed) and restart the service.

    For more information, see the section Security Model for Windows Server AppFabric (https://go.microsoft.com/fwlink/?LinkId=193179).

    Monitoring provider

    Select the provider that will give access to the monitoring database. All valid data providers registered in the local machine.config file will be displayed in this list.

    Configure

    After selecting the monitoring provider, click to set the configuration for the monitoring provider. For more information about configuring the SQL monitoring provider, see the discussion of the Configure SQL Monitoring Store dialog box below. You can also select a custom monitoring provider.

    How to install additional Monitoring providers

    You can add a monitoring provider to the list of providers that you can select in the Monitoring provider drop-down box. Click this link to get help on how to add a provider.

  2. If you clicked Configure for the SQL monitoring provider (System.Data.SqlClient) on the Configure Hosting Services page, the Configure SQL Monitoring Store dialog box will be displayed. The following table describes the controls in this dialog box. Use this table to configure the monitoring store, and then click OK to return to the Configure Hosting Services page. Verify that the store was initialized and registered successfully.

    Control Description

    Register AppFabric monitoring store in root web.config

    Select to register the monitoring store identified by the connection string, by adding its configuration to the root Web.config file. This includes the ApplicationServerMonitoringConnectionString and its related monitoring behavior. This registration makes the connection string and behavior available at all scopes on the computer.

    You can select this check box even if Initialize monitoring store is not selected. Do so if the database is already created and initialized, or to point to the database even if it is not initialized.

    Note

    This check box is disabled if the Hosting Administration tools are installed, but the Hosting Services feature is not installed.

    Initialize monitoring store

    Select to initialize the monitoring database identified in the connection string, as required before it can be used. Initialization creates the database schema and the structure based upon that schema. If the database does not exist, it will be created, and then initialized.

    If this check box is selected, but Register AppFabric monitoring store in root web.config is not selected, then the database will be created, if necessary, and initialized, but it will not be available for use from this computer.

    The initializing operation is performed by the initialization cmdlets. For more information, see the Windows Server AppFabric help (https://go.microsoft.com/fwlink/?LinkId=164929).

    Note

    For the database to be created, you must have permissions to create databases on the destination server.

    Connection string

    String specifying the server and database used to access the monitoring store.

    In the Server field, enter the name of the computer that the database is on.

    In the Database field, enter the name of the database to be created for monitoring data, or select an existing database from the list.

    Security Configuration

    Select Windows authentication or SQL Server authentication.

    For Windows authentication, to change the administrators, readers, or writers role, click Browse and use the standard Select User or Group dialog box to enter a different value. You can change the value for administrators, readers, or writers only if Initialize monitoring store is selected.

    Note

    When you have installed only Hosting Administration, and you are initializing the monitoring SQL store with Windows authentication, no group or user is entered by default for the Administrators, Readers, or Users role. You will need to click Browse and enter a group or user manually for each role before proceeding with the configuration.

  3. After setting the monitoring configuration, proceed to the next section of this topic if you want to set persistence configuration. Otherwise, click Next to display the Configure Caching Service page, and proceed to the “Configure Caching Service” section of this topic.

Configure Persistence

  1. On the Configure Hosting Services page, use the tables below to configure persistence, and then click Next.

    Note

    This page will be displayed only if you selected Worker on the Feature Selection page.

    Control Description

    Set persistence configuration

    Select this check box to select the Workflow Management service account, and to select and configure the persistence store.

    AppFabric Workflow Management service account

    Displays the Windows logon account for the Workflow Management service. The Workflow Management service account is a member of the Administrators group, and has administrative access to the persistence database. The default is NT Authority\LocalService.

    Change

    If you click Browse for the Workflow Management service account, you will be able to select the user credential for system services. You can select a built-in account or enter a custom user name and password. In the Select User dialog box, select the account that you want to use for the service, and then click OK.

    For more information, see the section Security Model for Windows Server AppFabric in (https://go.microsoft.com/fwlink/?LinkId=193179).

    Persistence provider

    Select the provider that will give access to the persistence database. All valid data providers registered in the local machine.config file will be displayed in this list.

    Configure

    Click to set the configuration for the persistence provider.

    How to install additional Persistence providers

    You can add a persistence provider to the list of providers that you can select in the Persistence provider drop-down box. Click this link to get help on how to add a provider.

  2. If you clicked Configure for the SQL persistence provider (sqlStoreProvider) on the Configure Hosting Services page, the Configure SQL Persistence Store dialog box will be displayed. The following table describes the controls in this dialog box. Use this table to configure the persistence provider, and then click OK to return to the Configure Hosting Services page. Verify that the store was initialized and registered successfully.

    Control Description

    Register AppFabric persistence store in root web.config

    Select to register the persistence store identified by the connection string, by adding or updating its configuration in the root Web.config file. This includes the ApplicationServerWorkflowInstanceStoreConnectionString and its related persistence behavior. This registration makes the connection string and behavior available at all scopes on the computer.

    You can select this check box even if Initialize persistence store is not selected. Do so if the database is already created and initialized, or to point to the database even if it is not initialized.

    Note

    This check box is disabled if the Hosting Administration tools are installed, but the Hosting Services feature is not installed.

    Initialize persistence store

    Select to initialize the persistence database identified in the connection string, as required before it can be used. Initialization creates the database schema and the structure based upon that schema. If the database does not exist, it will be created, and then initialized.

    If this check box is selected, but Register AppFabric persistence store in root web.config is not selected, then the database will be created, if necessary, and initialized, but it will not be available for use from this computer.

    The initializing operation is performed by the initialization cmdlets. For more information, see the AppFabric core help.

    Note

    For the database to be created, you must have permissions to create databases on the destination server.

    Connection string

    String specifying the server and database used to access the persistence store.

    In the Server field, enter the name of the computer that the database is on.

    In the Database field, enter the name of the database to be created for persistence data, or select an existing database from the list.

    Security Configuration

    Select Windows authentication or SQL Server authentication. Windows Integrated Security is selected by default and the groups are populated with the default built-in groups.

    For Windows authentication, to change the administrators, readers, or users role, click Browse and use the standard Select User or Group dialog box to enter a different value. You can change the value for administrators, observers, or writers only if Initialize persistence store is selected.

    Note

    When you have installed only Hosting Administration, and you are initializing the persistence SQL store with Windows authentication, no group or user is entered by default for the Administrators, Readers, or Users role. You will need to click Browse and enter a group or user manually for each role before proceeding with the configuration.

  3. After setting the persistence configuration, click Next on the Configure Hosting Services page. The setup program will start the Event Collection service and Workflow Management service, if they are configured, and then display the Configure Caching Service page. Proceed to the “Configure Caching Service” section of this topic.

Configure Caching Service

  1. On the Configure Caching Service page, use the tables below to configure the Caching Service, and then click Next. A pop-up message will be displayed indicating that this action will apply the Caching Service configuration. To continue, click Yes. When you do so, the configuration settings will be made in the Caching Service configuration file. The Configure Cache Node page will then be displayed.

    Note

    This page will be displayed only if you selected at least one of the Caching Services features on the Feature Selection page of the installation wizard (Caching Service, Cache Client, or Cache Administration).

    Control Description

    Set Caching Service configuration

    Select to add or update system-level configuration of the Caching Service feature.

    Caching Service account

    Displays the Windows logon account for the Caching Service. By default, the Caching Service account is used for the Caching Service configuration provider. The default is NT AUTHORITY\NETWORK SERVICE.

    If your computer is part of a workgroup, you must change the Caching Service account. Use a local account that exists on all computers participating in the cluster and use the same password for the account on all computers. For configuration, the local account must have local administrator privileges, and must not be a built-in account. This step is not necessary for domain-joined machines.

    Change

    Click to display the Select User dialog box that you use to select an account for the Caching Service account.

    Caching Service configuration provider

    When specifying the Caching Service configuration provider, there are two options available:

    1. XML – Caching Service configuration information is stored in an XML file on a network file share.

    2. SQL Server Distributed Cache Configuration Store Provider – Caching Service configuration information is stored in a SQL Server database.

    Warning

    If XML is selected and the network discovery property is turned off, and you click Browse to select a file share for the XML provider, you will not be able to expand the Network folder in the Browse for Folder dialog box. You can, however, type in a UNC server share. To be able to expand the Network folder, you need to turn network discovery on by opening Control Panel, selecting Network and Internet, selecting Network and Sharing Center, selecting Change Advanced sharing settings, clicking Turn on network discovery, and then clicking Save changes.

    Note

    In workgroup scenarios, only the XML provider is supported, not database providers.

    Configure

    If you chose SQL Server AppFabric Caching Service Configuration Store Provider as the configuration provider, click Configure to create or select a Caching Service configuration database.

    File Share

    If you chose XML Provider as the configuration provider, enter or browse to the network file share that will contain the XML configuration file. The file share must be a valid UNC path,for example, \\server\share.

    Important

    You must manually create a network file share that is accessible to all cache servers in the cache cluster. The user account that is running the AppFabric configuration wizard must have “Owner” or “Co-Owner” permissions to the specified network file share and “Full Control” permissions to the folder at the file system level.

    The Caching Service must have Read/Write access to the network file share.

    Browse

    If you click Browse for the File share, you will be able to use the Browse for Folder dialog box to select the file share for the XML configuration provider. Select an existing folder or create a new folder, and then click OK.

    New cluster/Join cluster

    Select New Cluster if this is the first computer in the cluster. When you run Setup on subsequent computers in the cluster, select Join Cluster. The default is New Cluster.

    To create or join a cluster, you need to specify the location of the configuration data (either in a database or an XML file), and then on the next page (the Configure AppFabric Cache Node page) enter the ports, and set the firewall settings to unblock the services listed.

    When creating a cluster, you need to indicate the cluster size (the number of computers in the cluster). This enables the system to optimize memory allocation.

    Cluster size

    Select one of the following three options to optimize performance based on cluster size. This setting is available only if the New Cluster control is selected.

    • Small [1-5 computers]

    • Medium [6-15 computers]

    • Large [> 15 computers]



      Note

      After this selection has been set, it cannot be changed.

      Note

      Your cluster size is not limited by this selection. You can still add or remove computers from the cluster after optimization. However, performance will only be optimized when the cluster size is within the range specified. Select a cluster size based upon the eventual number of nodes that will be in the cluster. After you set the cluster size during configuration, you cannot change it later. If you select Small for the cluster size, the cluster will be optimized for one to five computers. If your cluster eventually grows to ten computers, the cluster will still be optimized for one to five computers. You cannot subsequently change the cluster size to Medium, in order to optimize the cluster for 6 to 15 computers.

  2. If you selected SQL Server AppFabric Caching Service Configuration Store Provider in the Caching Service configuration provider drop-down list and click Configure, the Microsoft AppFabric 1.1 for Windows Server Caching Configuration Store dialog box will be displayed. Use the tables below to configure the SQL store, and then click Next.

    Note

    When you click OK in the Microsoft AppFabric 1.1 for Windows Server Caching Configuration Store dialog box, the distributed cache database will be created, and a pop-up message with the results of the operation will be displayed.

    Note

    Security configuration settings do not need to be made on this page because Windows authentication is required. Caching does not support SQL authentication.

    Control Description

    Register AppFabric Caching Service configuration database

    Select to register the configuration database identified by the connection string, by adding its configuration to the root Web.config file, and to set the security configuration. This registration makes the connection string and behavior available at all scopes on the computer. You can select this check box even if Create AppFabric Caching Service configuration database is not selected. Do so if the database is already created.

    Create AppFabric Caching Service configuration database

    Select to create the configuration database and to specify the connection string.

    Connection String

    Enter the server in the Server field and select or type the database in the Database field.

  3. When you click Next with the Configure Caching Service page displayed, the Configure AppFabric Cache Node page will be displayed. Use the tables below to configure the cache node ports and Windows firewall.

    Note

    This page will be displayed only if you selected at least one of the Caching Services features on the Feature Selection page. You can set the firewall exceptions only if the Windows Firewall service is enabled.

    Note

    If the Windows Firewall is disabled, the Windows firewall exceptions area of the Configure AppFabric Cache Node dialog box will be disabled.

    Control Description

    Node ports

    Enter or select a unique value for each port, or leave the default settings.

    • Service port. The default is 22233.

    • Cluster port. The default is 22234.

    • Arbitrator port. The default is 22235.

    • Replication port. The default is 22236.

    The valid range for port values is 1024 through 65535. Each port must have a unique port number.

    Windows firewall exceptions

    For the AppFabric Distributed Cache features to function, you must configure the Windows Firewall rules to allow access for the Cache Service.

    1. Microsoft AppFabric 1.1 for Windows Server: AppFabric Caching Service

    2. Remote Service Management

    Important

    If you are using a third party (non-Windows) firewall, or a Windows Firewall that is subject to domain policy, you must manually configure the firewall for the caching features to work properly.

    Note

    After you click Next on the Configure AppFabric Cache Node page, the Configure Application page will be displayed if the AppFabric hosting features are installed. Proceed to the next section of this topic.

Complete Configuration of Microsoft AppFabric 1.1 for Windows Server

  • On the Configure Application page, select Start Internet Information Services (IIS) Manager to configure an application in the IIS Manager. Click Finish to close the configuration wizard.

Note

After the AppFabric Configuration Wizard has successfully configured the Caching Service, you will need to use administration cmdlets to start the cluster or start individual hosts in the cluster. Use the Start-CacheCluster or Start-CacheHost cmdlet. For more information about these cmdlets, see Cache Administration with Windows PowerShell (https://go.microsoft.com/fwlink/?LinkId=193181).

Start Cache Host Services for the First Time

After installation for the first time, you will need to start the cache cluster. Configure at least one node in the cluster, and then execute a cmdlet to start the cluster.

In the developer scenario (using a single-node cluster), to start a new cluster execute Use-CacheCluster (to set the context of your Windows PowerShell session to a particular cache cluster) and then execute Start-CacheCluster.

In a multiple-node cluster, to start all cache host services in the cluster (lead hosts first), execute Start-CacheCluster. For additional cache hosts (and any other cluster-level configuration changes) to be acknowledged by the cache cluster, you need to restart all cache host services with Restart-CacheCluster. To start a specific cache host service, execute Start-CacheHost.

For more information, see Cache Administration with Windows PowerShell (https://go.microsoft.com/fwlink/?LinkId=193181).

  2012-09-12