Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next
 

Enhancing Performance

As more users start accessing your Dispatcher applications, you may need to increase the number of Application Servers available to your applications. When you add servers, you must also define the server selection process. To fine-tune performance, you need to modify your Broker configuration file. For example, to fine-tune the server connection process for socket services, you can add more processes (referred to as load balancing). The following information describes how you can change the directives in the Broker configuration file to improve performance.

Using Multiple Servers and Ports (Load Balancing)

You can supply multiple names of the physical machines on which Application Servers are installed or multiple TCP/IP port numbers representing many server processes on a single machine. The following example shows multiple servers and ports:

Server machine_a machine_b machine_c machine_d
Port 5000-5002
Server machine_e
Port 5001 5003

This example provides 12 server/port combinations (4 servers and 3 ports) for servers a, b, c, and d and 2 server/port combinations (1 server and 2 ports) for server e, totaling 14 different Application Servers. For the Broker to access these Application Servers, they must be running. If one or more are not running, Broker will try to access another one. If you need a diagnostic tool, you can set a _DEBUG value to trace the connection attempts.

Notice that you can specify a range of ports, for example, 5001-5003. You can also specify any number of single ports or port ranges on one line.

Increasing Timeout

The ServiceTimeout directive specifies the number of seconds that the Broker should wait for a response from the Application Server. When the specified time elapses, the Broker returns an error message to the Browser. To avoid receiving this error message, increase the timeout period to increase your chances of connecting when the server is very busy. The default value is 60 seconds. The global directive Timeout overrides this default. The directive ServiceTimeout further overrides the global timeout for a particular service.

Using Server Weights

If you want to direct the connection to a particular machine out of a range of servers you have predefined, you can increase the chances of a particular one being selected by specifying weights for each machine.

If you have two computers running Application Servers, each machine has one in two chances of receiving a request from the Broker. The Broker randomly selects one of your predefined servers. To increase the likelihood that a server receives requests, assign a weight to the machine in the server directive, as shown in the following example:

Server machine_a machine_b*5

Server a now has only a one-in-six chance of receiving a request. Server b now has a five in six chance. You could rewrite the previous example to show the following and attain the same result. The weight assignment of 5 merely saves you from having to type this:

Server machine_a machine_b machine_b machine_b machine_b machine_b

Specifying a Backup Machine

You can use weights to specify a backup machine that receives requests only if the server running on the primary machine is not operating. To do so, set the weight to zero (0), as shown in the following example:

server machine_a machine_b*0

Under normal circumstances, server a acts as your primary machine and server b never receives requests. However, if server a is not operating, the Broker attempts to connect to server b.

Note: Weights apply to server machines and not to individual ports on those machines. You cannot force the Broker to favor one port over another on the same machine.


Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next