SAS 9.1.3 Integration Technologies » Server Administrator's Guide


Pooling and Load Balancing
Pooling
Planning and Configuring Pooling
Load Balancing
Planning and Configuring a Load-Balancing Cluster
Planning the Load-Balancing Algorithm
Reference Materials
Fields for the Server Definition
Fields for the Pooling Logical Server Definition
Fields for the Load-Balancing Logical Server Definition
Pooling and Load Balancing

Overview of Load Balancing

What Is Load Balancing?

Load balancing is a feature of the object spawner that balances workloads across server processes and across server machines. When a logical SAS Workspace Server or a logical SAS Stored Process Server is configured as a load-balancing cluster, client requests to any of the servers in the cluster are directed to the server that has the least load. The amount of load on a server is determined by a load-balancing algorithm.

Note: 
  • Release 8.2 (and earlier) clients cannot connect to a Version 9 or later load-balancing server.

  • Load balancing is not supported for COM and DCOM connections.

How Load Balancing Works

For SAS Workspace Servers, load balancing distributes work equally across server machines.

For SAS Stored Process Servers, load balancing distributes work equally across server processes. These server processes can exist on the same machine or across multiple machines.

Load balancing occurs within a group of servers called a cluster. Each machine in the cluster runs an object spawner that handles client requests for connections. All of the spawners in the cluster are connected together, and they share their server load information. A load balancer routine runs in each object spawner and directs client requests to the server or server process that is least loaded at the time the client request is made. Subsequent calls are performed as direct calls between the client and SAS.

Note: Each client's credentials must be able to authenticate against any server in the load-balancing cluster. Therefore, when you define server connections within a load-balancing cluster, you must use the same authentication domain for each connection.

When you launch a load-balancing spawner, you must specify a metadata configuration file that contains information for accessing a SAS Metadata Server. The spawner processes information as follows:

Diagram to show how the spawner processes information
  1. Each spawner accesses a metadata configuration file to obtain information about how to access the SAS Metadata Server.

  2. Each spawner connects to and reads metadata from the metadata server to determine which machines or ports are in the cluster.

  3. Each spawner then attempts to establish an IOM connection to each spawner in the cluster.

Each spawner then has the server metadata in order to launch new server processes for client requests. If one machine in the cluster becomes unavailable, then the other machines in the cluster detect that the machine is unavailable and continue to run and process any client requests.

Note: You can launch load-balancing spawners at any time, as follows:

  • If you start a spawner is already defined as part of the load-balancing cluster, then the spawner is immediately included in the cluster.

  • If you start a spawner that is new to the load-balancing cluster, then you must restart the other spawners in the cluster.

Note: Because a client can connect to any machine, client programs should not depend on being able to reconnect to the same server.

Example

Diagram of load balancing scenario

The following scenario assumes a load-balancing cluster that contains two server machines. The spawner on each machine is running, and each spawner has started three server processes.

A Web application connects to SAS using the Windows Object Manager (or the Java Connection Factory) as follows:

  1. A Web application receives a request from the browser.
  2. The Web application requests a connection to an IOM server.
  3. The object spawner redirects the connection to the server that has the least load.
  4. The Web application reconnects to the least-loaded server, and the load value for that server is increased.

When the Web application disconnects from the server, the load for that server returns to its previous value.

MultiBridge Connections (SAS Stored Process Servers Only)

When you configure load balancing for SAS Stored Process Servers, you must define at least one MultiBridge connection for each server in the cluster. Each MultiBridge connection represents a separate server process within a Stored Process Server definition, and each MultiBridge connection runs on a specific port.

The Bridge connection for a stored process server is only used for the initial server request. After the spawner determines which server process has the least load, the client is redirected to the appropriate MultiBridge connection. That is, a client requests the Bridge connection for a stored process server, and then the spawner redirects the client to the appropriate MultiBridge connection.

Note: MultiBridge connections use the server's multi-user login credentials. When using MultiBridge connections, you must specify multi-user login credentials on the server definition.

Security

With load balancing, every connection to the server is authenticated with the credentials of the client. However, the credentials that server runs under depends on the type of server:

  • SAS Workspace Servers runs under the credentials of the client
  • SAS Stored Process Servers runs under the multi-user login credentials that are specified in the stored process server definition (Advanced Options arrow Credentials arrow Login) in SAS Management Console. The multi-user login credentials should be defined as a group login for a group that all of the client users are members of.

    Note: Because the load-balancing stored process server runs under the multi-user login credentials, the operating system account for these credentials must have access to any operating system resources used by stored processes that are hosted on the stored process server.

You can use normal server security mechanisms to protect sensitive data. For more information about load-balancing security, see Planning the Load Balancing Security.

Administration (SAS Stored Process Servers Only)

For SAS Stored Process Servers, you can use the administrator command cluster reset to shut down load-balancing servers in a cluster. For details, see Using Telnet to Administer the Spawner.

Note: The cluster reset command only affects servers that were launched from the spawner to which you are currently connected.

Algorithms

Load balancing supports two different types of load-balancing algorithms:

Cost (SAS Workspace Servers and SAS Stored Process Servers)
The cost algorithm assigns a cost value (determined by the administrator) to each client that connects to the server. The algorithm can also assign cost values to servers that have not started yet. When a new client requests a connection, load balancing redirects the client to whichever server is determined to have the lowest cost.

Response Time (SAS Stored Process Servers only)
Each spawner's load balancer maintains an ordered list of machines and their response times. Load balancing updates this list periodically, at an interval that is specified by the administrator. When a new client requests a connection, load balancing redirects the client request to the machine at the top of the list.

For more details about load-balancing algorithms, see Planning the Load-Balancing Algorithm Properties.

Setting up Load Balancing

To plan and set up load balancing, see Planning and Configuring a Load-Balancing Cluster.