此内容没有您所选择的语言版本。
14.6. Configure a load-balancing cluster with ISAPI
Task: Configure ISAPI to serve a Load-Balancing Cluster
Complete this task to configure ISAPI to manage applications common to all servers, route requests to JBoss Enterprise Application Platform instances, and redirect requests to live nodes when some nodes are not online or experiencing connectivity issues.
Use the configuration as an example when configuring your ISAPI cluster.
Prerequisites
- Complete the relevant Microsoft IIS clustering setup procedure. Refer to Section 14.3, “Microsoft IIS 6 initial clustering configuration” or Section 14.4, “Microsoft IIS 7 initial clustering configuration” for more information.
- The following steps assume that the
C:\connectorsdirectory is used to store logs, properties files, and NSAPI locks.
Create isapi_redirect.properties file
Create a new file namedisapi_redirect.propertiesin thedirectory.NATIVE\sbin\Important
Theisapi_redirect.propertiesfile must be in the same directory as theisapi_redirect.dllfile.Append the following configuration block to the file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Create rewrite.properties file
Therewrite.propertiesfile allows you to specify simple URL rewrites specific to an application. This configuration file is optional, and can be excluded from theisapi_redirect.propertiesfile if URL rewrites are not required.The functionality offered is similar to Apache HTTP Server's mod_rewrite, but is less powerful. You specify the rewrite path using name-value pairs. A simple example is where the app_01 application has an abstract directory name containing images, and you want to remap that directory to something more intuitive.#Simple example, images are accessible under abc path /app-01/abc/=/app-01/images/
#Simple example, images are accessible under abc path /app-01/abc/=/app-01/images/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create uriworkermap.properties file
Theuriworkermap.propertiesfile contains deployed application mapping configuration information. Append the following lines to the file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create workers.properties file
Theworker.propertiesfile contains mapping definitions between worker labels and server instances. Append the following lines to the file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
For an explanation ofworkers.propertiesdirectives, refer to Appendix A, Reference: workers.properties.Restart IIS
Restart your IIS server to implement the changes. Execute the following commands for the IIS version you are running:- IIS 6
net stop iisadmin /Y net start w3svc
C:\> net stop iisadmin /Y C:\> net start w3svcCopy to Clipboard Copied! Toggle word wrap Toggle overflow - IIS 7
net stop was /Y net start w3svc
C:\> net stop was /Y C:\> net start w3svcCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verify the Logs
Ensure you check the ISAPI logs once IIS has restarted. The logs are saved to the file location specified in the log_file property inisapi_redirect.properties. You should also check IIS logs and the Event Viewer for other events of type Warning or Error.