Load Balancing / SPLF

The Web Application Load Balancing feature allows you to distribute your web application over multiple servers. When you use load balancing, your application is distributed over two types of nodes: a single Master Node and one or more Slave Nodes.

The Master Node resides on your Web Server (it resides on the same machine running Microsoft IIS). The Master server is primarily a router. It keeps track of where the Web Application processes (the WBOs) are located, and routes requests to the appropriate server. All your web pages reside on the Web server; therefore they reside on the Master Node.

The Web Application processes are located on Slave Nodes, which run on other physical servers (although this is not required). All communication between Master and Slave Nodes occur via TCP/IP. Each Slave Node runs the DataFlex Web Application processes. Typically a slave node will contain one or more Web Applications, with each application running a pool of Web Application processes. These processes will, in turn, use database tables located either on the same server or on some other server.

There are no programming considerations involved with the use of Load Balancing. Load Balancing is a configuration option. Several different configurations should clarify these options:

No Load Balancing

If you do not use Load Balancing, your web server and your Web Application processes will all reside on a single server. On a single server you control application scalability by adding multiple and/or faster processors, adding more memory, and by refining your process pooling configuration using the MinPool and MaxPool settings.

Master and a Single Slave on separate Servers

This is probably going to be the "basic" Web Application set up. The Master Node will reside on your Web Server. Since the Master Node primarily acts as a router, it only puts a small load on your Web Server. There will be no DataFlex instances running on the Master Server. Your Slave Server will run all the DataFlex WBO processes. Such a setting is ideal when installing a Web Application on an existing web server. Most all of your application overhead gets transferred off the Web server and on to a slave Server.

The slave server can be used to run a single Web Application, where you would create a separate slave server for each Web Application, or a single slave can be configured to run multiple Web Applications. In fact, a single slave server could be used to run multiple web applications from multiple web servers.

Master with Multiple Slave Servers

A single Web Application can be distributed over multiple slave servers. This allows you to distribute the load of a single application. In such a case, the Master Node will use the various slave nodes, based on a weighted round-robin method. For each web application, the master node will define the location (TCP/IP address and Port) of each slave node and will assign a weight to that slave node.

At this point your scalability options are almost unlimited. In addition, Load Balancing, when used in conjunction with Process Pooling, provides an automatic failure rollover. If an application is distributed over multiple slave servers, and one of those servers goes down, the Master server will direct all requests to the remaining slave servers. Since Web Application processes (which run on the slaves) are assigned on a page by page basis, an application server can fail, and a user (browser client) will never even be aware that the failure occurs. This assumes that the developer has written a proper web application that uses process pooling and persistence is managed using web properties .

 

See Also

Important Concepts and Options