Oracle9i Application Server:
Deploying Forms Applications to the Web
Release 1.0.2

A86783-01

PrevNext

Contents

Index

12
Load Balancing Considerations

12.1 Introduction

This chapter discusses load balancing considerations for Form Services. Load balancing allows you to maintain a pool of middle tier machines (a "server farm") and balance the load of server traffic among these machines. Load balancing is implemented using a servlet that can run on any Web server.

This chapter contains information about the following topics:

12.2 Load Balancing Terminology

Here are some terms you will want to understand before you set up load balancing:

12.3 Load Balancing in Action

Figure 12-1 illustrates the events that occur when you use load balancing:

Figure 12-1 Form Services load balancing


The following events occur when you use Form Services load balancing:

  1. Load Balancer Clients periodically send load information to the Load Balancer Server. This load information includes the total number of processes running on each Load Balancer Client.

  2. A user accesses a URL pointing to the Forms servlet.

  3. The Forms servlet asks the Load Balancer Server for the name of the least-loaded system that is available.

  4. The Forms servlet dynamically creates an HTML page with the name of the least-loaded system specified as the system on which to run the Form Services, and returns that HTML page to the user's Web browser.

  5. The user's Web browser then requests the Java applet to be downloaded from the host specified in the HTML page.

  6. The Java applet sends a request to the Form Services asking for a particular Form Builder application (that is, an .FMX).

  7. The server contacts a Form Services Runtime Engine. (The server maintains a pool of available Runtime Engines to minimize application startup delays.) Each active user receives a dedicated Runtime Engine.

  8. The server establishes a direct socket, HTTP, or HTTPS connection with the Runtime Engine, and sends the socket, HTTP, or HTTPS information to the Java applet. The Java applet then establishes a direct socket, HTTP, or HTTPS connection with the Runtime Engine. The Java applet and the Runtime Engine now communicate directly, freeing the server to accept startup requests from other users. (At this point, neither the application server nor the Form Services is involved in the communication between the applet and the Runtime Engine.) The Java applet displays the application's user interface in the main window of the user's Web browser.

  9. The Runtime Engine communicates directly with the database through Net8 or ODBC (Open Database Connectivity), depending on the data source.

  10. Load Balancer Clients continue to send load information to the Load Balancer Server. All new service requests are routed based on that information.

Note:

If the Load Balancer Server is unavailable, at Step 3 the Forms servlet will not get any information back about which is the least-loaded system. Instead, the Forms servlet will redirect the user's browser to the URL specified by the MetricsServerErrorURL parameter. The user does not necessarily know this is happening because the redirect is behind the scenes from the user's viewpoint.

12.4 Configuring for Form Services Load Balancing

You can implement load balancing using the following executables provided with Form Services:

You will need to install and configure the load balancing components on each machine that will be load balanced. This includes the machine with the primary node and any other machines containing secondary nodes.

You will also need to edit the forms60_server shell script on each machine that is using load balancing. The forms60_server shell script is found in the <ORACLE_HOME>/6iserver directory.

Be sure that:

You will need administrator privileges to make the changes, and will need to stop and restart the process in order for the configuration changes to take effect.

To configure for load balaning, you must set the following paramaters on each machine within the forms60_server shell script:

12.4.1 Form Services Listener Parameters

Set the port number and protocol to be used by the Form Services Listener by editing the forms60_server shell script found in the <ORACLE_HOME>/6iserver directory. The following syntax is used to start the Form Services Listener:

f60ctl start port=<Forms Server Port> mode=<Protocol>

For example:

f60ctl start port=9001 mode=socket

Form Services Port: The default is 9001. Enter the TCP/IP port number to which the Form Services will listen for form execution requests.

Note:

All Form Services that are to be load balanced must have the same Form Services Port value.

Protocol: The default is socket. This is the protocol that will be used for communication between the Forms Runtime Engine and the Forms Java applet. The value should only be changed to HTTP or HTTPS if communications must pass through a firewall. (For example, select HTTP if this machine is inside a firewall and the Forms applications must be available to users outside the firewall. Select HTTPS to use HTTP 1.1 with SSL, secure sockets layer.)

You can accept the default parameters values, or modify the startup parameter values for the Form Services. Change the port number only if it is already being used by another program.

12.4.2 Load Balancer Server Parameters

Set the port numbers to be used by the Forms Load Balancer Server by editing the forms60_server shell script found in the <ORACLE_HOME>/6iserver directory. The following syntax is used to start the Load Balancer Server:

d2ls60 <Data Port> <Request Port> <Maximum Clients> <Trace Level>

For example:

d2ls60 9011 9021 1000 0

Data Port: The default is 9011. Enter the TCP/IP port number on which to listen for load data from Load Balancer Clients (which will run on Secondary Nodes).

The Data Port value for the Load Balancer Server must match the Data Port values for ALL Load Balancer Clients.

Request Port: The default is 9021. Enter the TCP/IP port number on which to listen for requests for the "least loaded host" made by the Forms servlet. This value is written to the formsweb.cfg file as the MetricServerPort parameter.

The serverHost parameter is set to the value %LeastLoadedHost% (i.e. serverHost=%LeastLoadedHost%). You should append your domain name to the serverHost parameter if a domain name is required in your network for name resolution. For example, serverHost=%LeastLoadedHost%.us.oracle.com.

Maximum Clients. The default is 1000. Specifies the maximum number of Load Balancer Clients that will be running and sending load information to the Load Balancer Server.

Trace Level: The default is 0 for no tracing. Specifying 10 allows you to create output for the Load Balancer Server.

Note::

For all machines that are being used and configured as secondary nodes only, you will have to edit the forms60_server shell script and remove the section related to the Load Balancer Server.

This section includes the lines from

# Stop load lalancing server
 

until the line

# Stop load balancing client.

12.4.3 Load Balancer Client Parameters

Set the Load Balancer host name and data port number to be used by the Forms Load Balancer Client by editing the forms60_server shell script found in the <ORACLE_HOME>/6iserver directory. The following syntax is used to start the Load Balancer Client:

d2lc60 <Load Balancer Host> <Data Port> 0 [<Scale Factor> <Process Name>]

For example:

d2lc60 neko 9011 0 1 f60webm

Load Balancer Host: The default value is originally set to the name of the local machine you installed the software on. This name needs to be changed to the name of the host containing the Load Balancer Server. Enter the full host name of the Primary Node (the machine on which the Load Balancer Server is running). The value can contain up to 256 characters.

Data Port: The default is 9011. Enter the TCP/IP port number to which the load balancer server is listening for load data. The Data Port value for each Load Balancer Client must match the Data Port value for the Load Balancer Server.

Scale Factor: The default is 4 for Windows NT and 1 for UNIX. The scale factor allows you to reduce the imbalances resulting from varying capacities of Load Balancer processes running on each Load Balancer Client. A system that appears to be the least-loaded system may not necessarily be the best place to run a new process. You should assign a higher value for the scale factor for your lower-capacity systems.

Process Name: The default is f60webm. Setting the value tells the Load Balancer Client to count processes (for load balancing pruposes_ whose executable name matches the name specified. If a value is not specified, all proceses on the machine are counted.


Prev Next
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Contents

Index