Load balancing distributes SAS sessions
across a cluster of servers. You can add or subtract servers to accommodate
changes in peak demand.
You can create load-balancing
clusters of SAS Workspace Servers, SAS Stored Process Servers, SAS
Pooled Workspace Servers, and SAS OLAP Servers. For all clusters except
OLAP, load balancing is handled by the object spawners that are associated
with each server. SAS OLAP Servers do not use object spawners, so
OLAP servers handle load balancing directly.
Pooled workspace servers
are deployed in load-balancing clusters when you install them with
the SAS Deployment Wizard. You can create clusters of the other server
types at initial deployment, or at any time thereafter, without having
to restart your SAS Metadata Server.
Load-balancing clusters
use a peer-to-peer connection. One of the peers in the cluster acts
as the parent for the cluster.
The following diagram depicts how peers read cluster
metadata at initialization.
The parent peer runs
a load-balancing algorithm to determine the server that is best suited
to accept another client. When the parent receives a client request,
the parent either begins the session itself or redirects the client
to a specific child peer.
If a child peer receives
a connection request directly from a client, the child peer routes
the request to the parent peer for assignment to the server with the
least load.
The following
diagram depicts how clients are assigned to a server in the cluster
for workspace servers and stored process servers.
The
following diagram depicts how clients are assigned to a server in
the cluster for OLAP servers.
During operation, if
the parent peer terminates, one of the child peers assumes the role
of parent peer. When you restart the former parent peer, it restarts
as a child peer instead of the parent peer. The new parent peer remains
the parent until that peer is restarted.
If a child peer terminates,
load balancing continues across the remaining peers. When a child
peer is restarted, the parent peer includes that peer in its routing
of client requests with no interruption of service.
When you add or remove
servers from a cluster, restart all of the peers (object spawners
and OLAP servers) in the cluster to ensure that all servers read the
latest metadata.
The following
display shows how load balancing clusters are defined under a single
application server and logical server in SAS Management Console.
Clustered Workspace Servers in SAS Management Console