Entering content frame

Process documentation Server Selection and Load Balancing Using the SAP Web Dispatcher Locate the document in its SAP Library structure

Purpose

The SAP Web Dispatcher forwards each incoming HTTP(S) request to an appropriate SAP NW Application Server for processing, as illustrated in the following graphic.

This graphic is explained in the accompanying text

The SAP Web Dispatcher carries out the following tasks:

     Checks the session ID to pass subsequent requests for stateful sessions to the processing server.

     Decides whether the request is an ABAP request (e.g. a BSP application) or a Java request (for example, a JSP or a servlet).

     Load balancing

     HTTPS scheduling or end-to-end SSL

     URL filtering

Process Flow

First of all, the SAP Web Dispatcher checks the type of the incoming request (see Processing Administration Requests).

The process flow described below only works if the request is not an administration request.

An HTTP request (or a decrypted HTTPS request) is assigned to a server in two stages. HTTPS requests with End-to-End SSL are dealt with last in this section.

...

       1.      First, the SAP Web dispatcher decides whether the incoming HTTP request should be forwarded to an ABAP or a Java server. It determines a group of servers in the SAP system that could execute the request.The SAP Web dispatcher gets the details about the groups from any application server. (Compare Server Groups in the ICF.)

       2.      The load is then balanced within this group. When the load balancing process has decided on the server that the request is to be sent to, the SAP Web Dispatcher forwards it to the ICM of this application server.

Determining the Server Group

How the SAP Web dispatcher determines the server group that will process the request is described under Determining the Server Group.

Working with Logon Groups in the SAP System

If the request should be sent to an AS ABAP, then you must check whether a logon group (maintained in transaction SMLG) has been defined for this URL.The SAP Web dispatcher checks the list of logon groups to see if one has been defined. If it finds one, the load balancing must be executed within this logon group.

Caution

Since with HTTP there are many requests, this logon group must have the attribute “external RFC” so that no one server is flooded with requests.

Load Balancing in the Server Group

Here there is a difference between static and dynamic load balancing procedures. With the SAP Web dispatcher both static and dynamic elements are used.

Static Load Balancing Process

Capacity is assigned to every application server. The requests are distributed in turn to the instances, whereby the distribution is weighted according to the respective capacities of the instances: If server A has double the capacity of server B, server A receives twice as many requests as B.

You can configure the details of the load balancing process in the profile parameter wdisp/load_balancing_strategy. The following table shows the differences:

Static Load Balancing in the SAP Web Dispatcher

Procedure

weighted_round_robin (default)

simple_weighted_round_robin

Explanation

The load is balanced using a load factor. The server with the lowest load factor receives the next request. If a server is assigned a request, the load factor is increased in proportion to the reciprocal value of the server capacity. The load factor is apparent from the Web Administration Interface.  As the load factor is constantly changing, the information about the "next preferred server" is simply a snap-shot situation.

Each server with capacity k receives precisely k requests in succession, before the next server takes over.

Advantages and Disadvantages

Better balancing, especially with end-to-end SSL

 

Better performance (with more than 20 systems)

The process, especially with end-to-end SSL could lead to unexpected results, if many individual servers have to process too many successive requests.

Requests received.

Example

Example

There are two servers, A and B. Server A has twice the capacity as server B (A has six dialog work processes, B only has three).  The requests are distributed as follows:

Request 1  ® A

Request 2  ® A

Request 3  ® B

Request 4  ® A

Request 5  ® A

Request 6  ® B

Request 1 to request 6 ® A

Request 7 to request 9 ® B

Request 10 to request 15 ® A

 

Dynamic Load Balancing Procedure

The dynamic load balancing algorithm for the Web Dispatcher is based on the standard server response times ("ping") that is determined periodically.

The algorithm is activated using the profile parameter:

  wdisp/load_balancing_strategy = adaptive

The URLs for the "ping" calls are taken from the following profile parameters:

     wdisp/ping_abap_url(default: /sap/public/icman/ping)

     wdisp/ping_j2ee_url (default: /index.html)

The "load" value displayed in the statistics keeps its meaning as the measure for the current utilization of the respective server (once the auto refresh timer has expired the value is reset to 0).

Server Selection and Load Balancing for HTTPS Requests

Since with End-to-End SSL HTTPS requests the SAP Web dispatcher is unable to read the URL, it can only distribute HTTPS requests in turn to the HTTPS-enabled servers in the system. This also takes into consideration the capacity of each server. To be able to process J2EE requests, each HTTPS-enabled server must have integrated the J2EE server.

The ICM of the server that receives the HTTPS request can decode the URL and then decide whether the request should be sent to the ICF or to the integrated J2EE server.

See also:

SAP Web Dispatcher and SSL

 

 

 

Leaving content frame