Este conteúdo não está disponível no idioma selecionado.
16.5. Configure a load-balanced cluster with NSAPI
Task: Configure a Load-balanced Cluster with NSAPI
Complete this task to configure a load-balanced cluster consisting of two worker nodes.
Prerequisites
- SJWS is installed in one of the locations specified in the SJWS file path abbreviation in Section 1, “File Name Conventions”.
Define the paths to serve via NSAPI
OpenSJWS/PROFILE/config/obj.conf
and define paths that should be served through NSAPI at the end of thedefault
Object definition, as shown:Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can map the path of any application deployed on your JBoss Enterprise Platform instance in thisobj.conf
file. In the example code, the/nc
path is mapped to an application deployed under the namenc
.Define the worker that serves each path
OpenSJWS/PROFILE/config/obj.conf
and add the followingjknsapi
Object definition after thedefault
Object definition.<Object name="jknsapi"> ObjectType fn=force-type type=text/plain Service fn="jk_service" worker="status" path="/jkmanager(/*)" Service fn="jk_service" worker="router" </Object>
<Object name="jknsapi"> ObjectType fn=force-type type=text/plain Service fn="jk_service" worker="status" path="/jkmanager(/*)" Service fn="jk_service" worker="router" </Object>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Thisjknsapi
Object defines the worker nodes used to serve each path that was assigned toname="jknsapi"
in thedefault
Object.Define the workers and their attributes
CreateSJWS/PROFILE/config/workers.properties
.Define the list of worker nodes and each worker node's properties in this file:Note
For an explanation ofworkers.properties
directives, refer to Appendix A, Reference: workers.propertiesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the server
Once your Sun Java System Web Server instance is configured, restart it so that your changes take effect.For Sun Java System Web Server 6.1:SJWS/PROFILE/stop SJWS/PROFILE/start
SJWS/PROFILE/stop SJWS/PROFILE/start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Sun Java System Web Server 7.0:SJWS/PROFILE/bin/stopserv SJWS/PROFILE/bin/startserv
SJWS/PROFILE/bin/stopserv SJWS/PROFILE/bin/startserv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow