5.2 Setting the software load balancer
This section describes the settings needed to use Web Server as a software load balancer for request load balancing. Create a node on a remote host (create-node-dcom subcommand), and then create a web server on the node (create-webserver subcommand). After remote host preparations are complete, create a dependency relation between the local host and the cluster created on the remote host (create-relation subcommand).
Prerequisites
-
The domain administration server (DAS) is running.
-
Application Server has been installed on the remote host for a software load balancer.
-
Settings to connect to the remote host for a software load balancer are complete.
Intended users
-
System engineers
Procedure
To create a node on the remote host, run the create-node-dcom subcommand of the asadmin utility command.
asadmin --user domain_administrative_user --passwordfile password_file_path create-node-dcom --windowsuser Windows_user_name --installdir installation_directory_path_for_Application_Server/javaee_absolute_path --nodehost remote_host_IP_address --nodedir directory_path_of_node_to_be_created name_of_node_to_be_created
When this command is run, the result is displayed as follows:
Command create-node-dcom executed successfully.
To create a web server on the node created on the remote host, run the create-webserver subcommand of the asadmin utility command.
asadmin create-webserver --node created_node_name name_of_web_server_to_be_created
When this command is run, the result is displayed as follows:
Command create-webserver executed successfully.
To create a dependency relation, run the create-relation subcommand of the asadmin utility command.
asadmin create-relation --relationtype redirect --from created_web_server_name --to name_of_cluster_on_which_dependency_relation_was_created --properties path=/:network-listener=http-listener-1 dependency_relation_name_to_be_created
When this command is run, the result is displayed as follows:
Command create-relation executed successfully.
When static contents are kept on the web server to increase performance, store static contents on the root document directory of the web server.
The web server root document directory is installation_directory_for_Application_Server/javaee/glassfish/nodes/node_name/web_server_name/root/htdocs.