Hitachi

Hitachi Application Server V10 User's Guide (For UNIX® Systems)


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-ssh 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

Intended users

Procedure

  1. To create a node on the remote host, run the create-node-ssh subcommand of the asadmin utility command.

    asadmin --user domain_administrative_user --passwordfile password_file_path
    create-node-ssh --nodehost remote_host_IP_address
    --sshuser remote_host_account_name --sshkeyfile ~/.ssh/id_rsa
    --installdir installation_directory_path_for_Application_Server/javaee_absolute_path name_of_node_to_be_created

    When this command is run, the result is displayed as follows:

    Command create-node-ssh executed successfully.
  2. 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.
  3. 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.
  4. 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.