Register Login

HTTP(S) Load Balancing using SAP Web Dispatcher

Updated Jun 08, 2018

How to use SAP Web Dispatcher for HTTP(S) load balancing?

Version-independent comments

As of 6.40, the SAP Web Dispatcher is delivered on the kernel CD for the SAP NetWeaver Application Server.

The Web Dispatcher 6. 40 is available on SAP Service Marketplace:

www.service.sap.com/patches under:

"Additional Components" -> "SAP Kernel" -> "SAP KERNEL 32/64 BIT" -> "SAP KERNEL 6.40 32/64 BIT" -> -> "Database Independent", package dw__xxxx.SAR

http://service.sap.com/patches under "Entry by Application Group" -> "SAP NetWeaver" -> "SAP NETWEAVER" -> "SAP NETWEAVER 04" -> "Entry by Component" -> "AS ABAP" -> "SAP KERNEL (32/64Bit, Unicode/non Unicode)" -> -> "Database Independent", Package dw__xxxx.SAR

For Web Dispatcher 7.00, a specific SAR sapwebdisp_< PL >-<...>.SAR is available on SAP Service Marketplace.

The current version of the SAP Web Dispatcher is Version 7. 11, which is available on SAP Service Marketplace at http://service.sap.com/patches:

"Support Packages and Patches -> Entry by Application Group"

-> Additional Components
-> SAP Kernel
-> SAP Kernel 32 Bit or SAP Kernel 64 Bit
-> SAP Kernel 7.11 nn bit
-> Operating system platform
-> "Database independent

The package is called sapwebdisp_< PL >-<...>.SAR. < PL > indicates the patch level.

The SAP Web Dispatcher is potentially downward-compatible, which means that the SAP Web Dispatcher may be higher or the same as the of the back-end system. However, you must take of the of the SAP Web Dispatcher .

You must consider 499327 for the use of the back-end 6.10.

As of 7.10, the SAP Web Dispatcher must run in a separate directory.

We recommend that you install the Web Dispatcher as a separate system via the SAP installation.

Alternatively to a normal installation, you can also unpack the contents of the archive SAPWEBDISP.SAR into a separate directory, for example

Windows: C:Program Files< SID >SAPWebDisp

UNIX: /usr/sap//sapwebdisp

Create the directory and unpack SAPWEBDISP. SAR into this directory. Make sure that there are no other files in the directory.

You must set the parameter DIR_EXECUTABLE in the instance profile of the Web Dispatcher to the selected directory.

You can use "sapwebdisp -v" to determine the version installed:

For example, SAP Web Dispatcher Version 7.00. 3, multithreaded, ASCII

The SAP Web Dispatcher writes any errors that occur into the

"dev_webdisp" file in the current work directory.

Information about SAP Web Dispatcher Version 6.40 and higher

The system files msvcp71.dll and msvcr71. dll must exist in your system to execute the Web Dispatcher on Windows. These files may be missing on older systems, in which case the program cannot be started. In this case, see SAP 684106 "Microsoft Runtime DLLs".

Configuring the SAP Web Dispatcher

The following parameters (with their default values in Version 7.00) restrict the maximum load on the Web Dispatcher:

icm/max_conn = 500
wdisp/HTTP/max_pooled_con = 500 and wdisp/HTTPS/max_pooled_con = 500
icm/req_queue_len = 500
icm/min_threads = 10
icm/max_threads = 50
mpi/total_size_MB = 80
mpi/max_pipes = 4000

Bear in mind that each active HTTP connection requires two memory pipes (therefore four event indicators) as well as two sockets. This is without yet mentioning the possible number of simultaneously active users, as a user can open several HTTP connections simultaneously depending on the particular application. You may have to change operating system parameters to allow for these types of high-load scenarios.

Relationship between users and active HTTP connections

To evaluate how many users can use the SAP Web Dispatcher, you must consider the following situations:

Depending upon the application, a dialog step can open several HTTP requests. These are generally distributed among as many as four parallel connections. The user does not see exactly how many connections are opened. The average number of HTTP connections per request is indicated in the following formula with req_per_dialog_step.

The "think time" is also a decisive factor affecting the utilization of the Web Dispatcher. This is the period of time (in seconds) between two dialog steps ("clicks") executed by the user. There is no active HTTP connection during this time (this still depends on the timeout, see below). The think time is indicated in the formula with thinktime_per_diastep_sec.

Another important factor here is the keepalive timeout (parameters icm/server_port_< xx > or icm/keep_alive_timeout), which defines how long the Web Dispatcher keeps the connection open for further requests. This timeout in seconds is indicated in the formula with conn_keepalive_sec.

Therefore, there is no global formula since the actual number of parallel HTTP connections concurrent_conn depends on the parameters. The following offers a rule of thumb:

concurrent_conn = (users * req_per_dialog_step * conn_keepalive_sec)/ (thinktime_per_diastep_sec)

You can use the mpi/total_size_MB formula to determine the total MPI size

mpi/total_size_mb = (concurrent_conn * mpi_buffer_size) / (1024 * 1024)

With 50 users, 3 requests per click, a keep_alive_timeout of 30 seconds (if the Web Dispatcher notices that resources are running out, it automatically sets the timeout for new connections) and an average think time of 20 seconds, the following maximum values result: concurrent_conn = 225 and mpi/total_size_MB = 14.

Therefore, the standard settings in the SAP Web Dispatcher are sufficient for this scenario.

With 500 users, 3 requests per click, a keep_alive_timeout of 60 seconds and a think time of 20 seconds, the following maximum values result:

concurrent_conn = 4500 and mpi/total_size_MB = 281.

With 1,000 users, 3 requests per click, a keep_alive_timeout of 30 seconds and a think time of 20 seconds, the following maximum values result:

concurrent_conn = 4500 and mpi/total_size_MB = 281.

With 12,000 users, 3 requests per click, a keep_alive_timeout of 5 seconds and a think time of 30 seconds, the following maximum values result:

concurrent_conn = 6000 and mpi/total_size_MB = 375.

Maximum parameter values for Version 6.40:

icm/max_conn = 8192 or > concurrent_conn
icm/max_sockets = 16384 or > 2 * concurrent_conn
wdisp/HTTP/max_pooled_con = 8000 or wdisp/HTTPS/max_pooled_con = 8000
icm/req_queue_len = 6000
icm/min_threads = 100
icm/max_threads = 200
mpi/total_size_MB = 500
mpi/max_pipes = 20500

Maximum parameter values for Version 7.00 and higher:

icm/max_conn = 16384 or > concurrent_conn
icm/max_sockets = 32768 or > 2 * concurrent_conn
wdisp/HTTP/max_pooled_con = 16000 or wdisp/HTTPS/max_pooled_con = 16000
icm/req_queue_len = 6000
icm/min_threads = 100
icm/max_threads = 500
mpi/total_size_MB = 500
mpi/max_pipes = 20500

Minimum parameter values (for all s):

mpi/buffer_size = 32768

In the parameter icm/server_port_, you have the option of entering the parameter HOST= to ensure that the port is connected to a specific host name only, and not to all host names (as is the default setting). If you want to run an IIS on the same host in addition to the Web Dispatcher, and want both programs to listen to the same port, you must make sure that you make the appropriate settings in the IIS. If you do not, the IIS listens to all available ports.

the following:

Depending on the log used between the SAP Web Dispatcher and the application server, either connections from the HTTP pool or HTTPS pool are used. Therefore, the maximum number of parallel connections must be increased either with the wdisp/HTTP/max_pooled_con parameter (for HTTP) or with the wdisp/HTTPS/max_pooled_con parameter (for HTTPS).

Connections using the ROUTER log at the Web Dispatcher always use connections from the HTTPS pool.

HTTP and ssl_encrypt = 0 or 1 (no encryption for the application server) use the HTTP pool or HTTPS pool.

HTTPS and ssl_encrypt = 0 (no encryption for the application server) use the HTTP pool or HTTPS pool.

Operating system dependencies:

that the operating systems often have restrictions for the maximum number of open file handles (sockets) for each process. Check that each process can have at least as many sockets (file handles) as is specified in the icm/max_sockets parameter (default is 2048).

At startup, the Web Dispatcher (and ICM) checks whether it can receive sufficient sockets from the operating system. If not, the trace file displays the following record:

[Thr 1] *** WARNING => maximum number of sockets supported on this host (1019) less than parameter icm/max_sockets (8192) [icxxrout_mt. 227]

You should then check the settings in the operating system:

AIX

You can use the "ulimit -n" command to obtain the current value for the maximum number of open sockets (default: 2000). Using the command 'chuser nofiles= ', the value can be changed for the user.

SUN Solaris

Use the 'limit' command to check the value of "descriptors" in the csh shell. You can also use the 'limit' command to change the value (further information is available under 'man limit').

HP UX

The "maxfiles", "maxfiles_lim" and "nfile" kernel parameters exist which are used to define the maximum open file handles. For PA-Risc, you should change the parameter with SAM -> kernel configuration for Itanium with kcweb or kctune.

Tru64 UNIX

In Tru64 UNIX, processes are limited by the open_max_hard (default 4096) and open_max_soft (default 4096) kernel parameters (both of these are defined in the proc kernel subsystem). In the entire system, the number is limited by the max_vnodes kernel parameter (kernel subsystem vfs).

The process of changing parameters in the system is described in 356370.

Windows platforms

Check the Windows Registry settings with regedt32:

My_ComputerHKEY_LOCAL_MACHINESYSTEMNCurrentControlSetServicesTcpipParameters:

MaxUserPort should be at least 0xfde8 = 65000

TcpTimedWaitDelay should be 0x1e = 30 (or less)

The Web dispatcher start option -auto_restart is not supported. For the automatic restart of the Web dispatcher after a process termination, the restart command (for example, Restart_Program_00) must be used here in the instance profile. For more information, refer to the chapter about the high availability of the SAP Web Dispatcher in the online documentation.

Linux

You can use the "ulimit -n" command to obtain the current value for the maximum number of open sockets (default: 1024). You must adapt the nofile parameter in the /etc/security/limits.conf configuration file.

AS/400

The standard value for the maximum number of open sockets is approximately 2000. However, if required, you can use an operating system API to increase this number. Due to a sequence problem, the system requests the maximum number of sockets BEFORE you know how many sockets the Web Dispatcher requires. This number must be determined before the system can call the above-mentioned API to increase the required number of sockets from the operating system.

The Web Dispatcher does not contain enough sockets only if this call fails. If NO error message of the following type occurs in the following four lines of the dev_webdisp, you can therefore ignore the warning that refers to the maximum number of sockets in AS/400.

"SiInit: o4_setmaxfh failed" occurs in the following four lines of the dev_icm, you can therefore ignore the warning that refers to the maximum number of sockets in AS/400.

z/OS:

The Web dispatcher start option -auto_restart is not supported. For the automatic restart of the Web dispatcher after a process termination, the restart command (for example, Restart_Program_00) must be used here in the instance profile. For more information, refer to the chapter about the high availability of the SAP Web Dispatcher in the online documentation.

6.40 Change history:

Details about the change history are now available in 908160.

SAP Web Dispatcher Documentation

7.1 The documentation for SAP Web Dispatcher 7.11 is available on the Help Portal (help.sap.com ) under "Documentation -> SAP NetWeaver PI/Mobile 7.1 Enhancement Package 1". Select the language.

In the SAP Library, select SAP NetWeaver Library -> Function-Oriented View -> Application Server Infrastructure -> SAP Web Dispatcher.

7.0 The documentation for SAP Web Dispatcher 7.0 is available on the help.sap.com Help Portal under Documentation -> SAP NetWeaver -> SAP NetWeaver 7.0 (2004s). Select the relevant language.

In the SAP Library, select SAP NetWeaver Library -> Key Functional Areas of SAP NetWeaver -> Key Functional Areas of the Solution Life Cycle Management -> System Management -> SAP Web Dispatcher.

6.40 The documentation for SAP Web Dispatcher 6.40 is available on the help.sap.com Help Portal under

Documentation -> SAP NetWeaver -> SAP NetWeaver 2004. Select the language.

In the SAP Library, select SAP NetWeaver -> Solution Lifecycle Management -> System Management -> SAP Web Dispatcher.


Comments

  • 11 Jul 2016 1:27 pm Guest

    Hi ,

     

    I have installed SAP webdispatcher in Central instance & in Production CI+DI available so how the load disctribution will happen ?is there any configuration or parameters need to be configured ?

    End users will access directly HTTP port (http://CI hostname:8000/sap/bc/bsp/sap/crm_ui_start/default.htm & http://DI hostname:8000/sap/bc/bsp/sap/crm_ui_start/default.htm)

    Please suggest us how to proceed further.

    Thanks for advance.. :)

    Rao Ippili

    +91 9008480640


×