- Microsoft Windows Server AppFabric Cookbook
- Hammad Rajjoub Rick G.Garibay
- 894字
- 2021-08-13 18:12:13
Changing the Windows Server AppFabric configuration after installation
Once Windows Server AppFabric is configured, it is still possible to change its configuration.
There could be a number of reasons for changing the configuration of an existing deployment. The following are some of the most common scenarios that would require such changes:
- Changes database repository (SQL instance for example)
- Changes to system accounts (for security reasons)
- Port number related changes for caching.
You can use the Windows Server AppFabric configuration wizard and make the required changes as they are required. In this recipe, we will see how to re-configure Windows Server AppFabric after installation.
Getting ready
You will need an existing instance of AppFabric that has been installed and configured to get started with this recipe. In this recipe, we will learn how to change Windows Server AppFabric configuration after it has been installed on the host OS.
How to do it...
To begin, launch the AppFabric Configuration wizard to go through the configuration options on an existing installation of AppFabric to easily select the options that we want to change.
- Start the Window Server AppFabric Configuration wizard.
- Accept the User Account Control (UAC) warning. Click on Next at the bottom of the screen to get started with the configuration.
- Give the wizard a few seconds while it loads the existing configuration. The screen should look as follows:
- We can now go ahead and change the monitoring configuration by selecting Set monitoring configuration and clicking on Change.
- This will launch a Windows Server AppFabric Monitoring Store Configuration wizard that we have already used in the recipe Configuring Windows Server AppFabric (hosting and monitoring) earlier in this chapter.
- By selecting Register AppFabric monitoring store in root web.config, we can specify the Server and Database name.
Note
The Initialize monitoring store option will create a new database (if it does not already exist) and it will also initialize the schema and the structure of the database (based on the Microsoft SQL Server provider for the AppFabric monitoring site).
It should also be noted that if you skip the Register AppFabric monitoring store in root web.config option, then the monitoring database will not be available on this computer.
- We can repeat steps 4, 5, and 6 by selecting Set persistence configuration.
- Next move to Caching Service and select Set Caching Service configuration, as shown in the following screenshot:
- Change the Caching Service account by selecting Change and opting for a relevant account.
- Change the File share (UNC server share) by browsing and selecting the appropriate share that we want to store the XML configuration file.
- Join an existing cluster (as opposed to creating a new one) by selecting the Join cluster option, as shown in the following screenshot:
- If you are joining an existing cluster, you will not be able to change the cluster size.
Note
It should be noted that the cluster size does not dictate the possible number of machines in the cluster; however, it does optimize the whole cluster based on the size selected. So for example, you can add seven machines to a cluster that is defined as "Small" (1-5 machines). However, Windows Server AppFabric will optimize the caching configuration based on cluster configuration of 1-5 machines.
- To change port numbers for caching, click on Next and change the values as required.
How it works...
One of the best things about Windows Server AppFabric is that it is highly configurable. Configuration can be changed in a variety of ways. For example, in this recipe our changes were driven by the Windows Server AppFabric configuration wizard; however, we could have achieved similar results using AppFabric PowerShell commandlets. We will learn more about PowerShell commandlets in the following chapters.
Another possible way to change configuration is to modify the configuration manually. For example, when using the XML provider, we can always go to the file share and modify the ClusterConfig.xml
file.
Windows Server AppFabric uses providers to abstract the implementation details of its Cache configuration as well as persistence and monitoring stores. In this recipe we used out of the box providers, but configuration storage and management can be further extended to implement a custom provider.
At runtime, Windows Server AppFabric looks up the registered configuration provider. Based on the provider it then accesses a specific configuration store. The configuration store is then used to fetch relevant information for that provider. For example, with the Caching configuration provider, the configuration store will store information such as port numbers, service accounts, and so on. Similarly, for the persistence and monitoring configuration providers, the configuration store will maintain information relevant to monitoring and persistence stores such as connection strings, for example.