Show TOC

SAP Application Server List Retrieval Specification Locate this document in the navigation structure

Abstract

SAP offers its SAP Web Dispatcher as an out-of-the-box solution for HTTP/HTTPS load balancing in SAP NetWeaver Application Server landscapes. Configuring the Web Dispatcher is very easy, as the configuration information can be retrieved from the system.

In order to enable automatic and dynamic configuration also with third party (hardware) load balancing solutions, this documentation reveals the detailed specification of an SAP web service providing the application server list which is also used by the Web dispatcher.

Caution Caution

Note that certain aspects of the complex SAP request routing logic such as the between URLs and SAP Logon Groups cannot be simply mapped onto a standard web switch configuration.

End of the caution.

Therefore, this documentation will focus on the basic load balancing of HTTP requests. This load balancing can be performed for stateless requests as well as for the first request of a stateful session. All subsequent request belonging to this session have to be directed to the same application server.

This document does not cover concepts how the stickiness of a request is enabled.

Note Note

Knowledge of the NetWeaver application server architecture as well as concepts and basic settings of the SAP Web Dispatcher helps to understand this documentation. You find a reference to the documentation at the end of this document.

End of the note.

 

In order to perform load balancing, the SAP Web Dispatcher periodically fetches a list of all active application servers of an SAP system from its message server. This list includes the host names as well as a static value indicating the capacity of each server (see below). This capacity is separated by stacks, i.e. a dual-stack instance has an ABAP capacity and a Java capacity.

Servers will be dynamically added and removed from the list whenever the SAP message server detects a new server starting up or a running server shutting down (or crashing), respectively. However, since a load balancer would only update the list periodically (e.g. every several minutes), it is recommended that a load-balancing device removes crashed servers from the list immediately.

The application server list is fetched via HTTP from the message server, which is the one central component of each SAP System that routes internal messages among application servers and is thus informed about the current status of each server.

Availability

The specification is valid for all SAP products based application server release 6.20 upwards with SAP kernel 6.40 upwards

Capacity

The capacity value is an estimate of the servers' strength. Currently, the heuristic used by the SAP system determines the static capacity values as follows:

  • AS ABAP: number of dialog processes of the instance.

  • AS Java: number of Java server processes.

Caution Caution

This heuristic may be changed by SAP without further notice.

End of the caution.
Host and Port Configuration

The network host name and HTTP port of the message server is configured via SAP configuration parameters rdisp/mshost in the default profile and ms/http_port in the profile of the message server.

For simplicity and performance, a plain text format is used in the HTTP message body to describe the server list as a set of server description records (separated by empty lines) as follows (CRLF denotes the Control/LineFeed as end-of-line indicator).

Constraints

Load balancing for a single-stack system (ABAP only or Java only) is much easier than for a dual-stack system, as the request type is clear. If you want to do load balancing for a dual-stack system, the following prerequisites must be met:

  • The system is homogeneous, i.e. all instances contain AS ABAP and AS Java.

    Note Note

    In case that two message servers are configured (one for ABAP, one for Java), the information has to be retrieved from the ABAP message server.

    End of the note.
  • Before a request is dispatched to a server, the load balancer checks that both stacks are available in the application server list.

Structure

The body of the HTTP response message is structured according to the following syntax.

Syntax Syntax

  1. <server-list> = "version" <major>"."<minor> CRLF
  2. <sap-server-name> CRLF
  3. <protocol-type> <host> <port> <description> CRLF
  4. ...
  5. <protocol-type> <host> <port> <description> CRLF
  6. CRLF 
  7. <sap-server-name> CRLF
  8. <protocol-type> <host> <port> <description> CRLF
  9. ...
  10. <protocol-type> <host> <port> <description> CRLF
End of the code.

CRLF stands for “carriage return line feed” (new line).

The following table explains the possible values for the variables. Examples are given below.

Caution Caution

The following explanations refer to version 1.2.

You get the application server list version 1.2 from the message server (release 6.40 onwards) with the following HTTP request:

http://<msg_server_host>:<msg_server_port>/msgserver/text/logon?version=1.2

In the first line of the response you see the version number.

End of the caution.

Note Note

You can also use HTTPS to retrieve the data from the message server. To do this, the message server has to be configured for HTTPS. See the documentation links at the end of the document for further information.

End of the note.

Variable

Value

Description

<major>.<minor>

two numbers separated by a period

Typical version description: the first number denotes the major version, the second number the minor version.

We use version 1.2 in the following.

<sap-server-name>

character string

Instance name.

  • AS ABAP or dual-stack instances: <host>_<SID>_<inst.no>

  • AS Java instances: J2EE<node_id>

Note Note

Don't use these strings to get information about the server, the information is contained in the lines below.

The instance name can be an opaque sting, if hash-encryption is configured with the profile parameter is/instname_encoding in the system profile DEFAULT.PFL. In the default setting, the parameter has the value none which means instance names are transferred in clear text.

End of the note.

<protocol-type>

AS ABAP

HTTP

Server has an HTTP port configured in the ICM.

HTTPS

Server has an HTTPS port configured in the ICM.

DIAG

Server has dialog work processes; this line contains the LB capacity of the AS ABAP.

...

Other values may be listed here: RFC, RFCS, SMTP among others. These protocols are not relevant for load balancing.

AS Java

J2EE

AS Java is active and HTTP port is configured.

J2EES

AS Java is active and SSL-anabled. HTTPS port is configured.

...

Other values may be listed here: P4, P4S, IIOP, IIOPS among others. These protocols are not relevant for load balancing.

<host>

character string

host name

<port>

number

port number

<description>

character string

The following strings are possible:

  • LB=<n> denotes the capacity of the application server for load balancing; applicable for DIAG and all AS Java protocols.

    Note Note

    For DIAG, the capacity is denoted with DIA=<n> in AS ABAP Release 6.40 (NetWeaver 04)

    End of the note.
  • SNC string (applicable for DIAGS and RFCS, see example below)

  • Virtual host index VHOST=<n> (applicable for version 1.2 only)

    Note Note

    The virtual host string is only used for AS ABAP. For every virtual host configured in the application server (parameter is/<prot>/virt_host_<n> in the instance profile), the corresponding ports are listed.

    End of the note.

Example

Java System

The following example shows the application server list of a Java-only system with two instances.

Syntax Syntax

  1. version 1.2
  2. J2EE187834720
  3. J2EE   ld8060.wdf.sap.corp  51800   LB=2
  4. J2EES  ld8060.wdf.sap.corp  51801   LB=2
  5. P4     ld8060.wdf.sap.corp  51804   LB=2
  6. P4S    ld8060.wdf.sap.corp  51805   LB=2
  7. IIOP   ld8060.wdf.sap.corp  51806   LB=2
  8. IIOPS  ld8060.wdf.sap.corp  51807   LB=2
  9. TELNET ld8060.wdf.sap.corp  51808   LB=2
  10.  
  11. J2EE507834720
  12. J2EE   ld8060.wdf.sap.corp  55000   LB=1
  13. P4     ld8060.wdf.sap.corp  55004   LB=1
  14. IIOP   ld8060.wdf.sap.corp  55007   LB=1
  15. TELNET ld8060.wdf.sap.corp  55008   LB=1
End of the code.

Here, two AS Java instances are configured on one physical host. One of them is SSL-enabled and offers ports for all protocols. The instance J2EE187834720 has double capacity (two Java server processes active) and thus gets twice as many requests (as far as the requests are stateless) from the Web Dispatcher as the other instance J2EE507834720.

ABAP System

Syntax Syntax

  1. version 1.2
  2. WDFD00146517A_BIN_53
  3. DIAG	WDFD00146517A	3253	LB=3
  4. RFC	WDFD00146517A	3353
  5. HTTP	WDFD00146517A	1080
  6. SMTP	WDFD00146517A	8025
  7. HTTP	WDFD00146517A	1080	VHOST=0
  8. SMTP	WDFD00146517A	8025	VHOST=0
  9.  
  10. ld8060_BIN_12
  11. DIAG	ld8060.wdf.sap.corp	3212	LB=7
  12. RFC	ld8060.wdf.sap.corp	3312	
  13. HTTP	ld8060.wdf.sap.corp	8888
  14. SMTP	ld8060.wdf.sap.corp	2500
  15. HTTP	ld8060.wdf.sap.corp	8888	VHOST=0
  16. SMTP	ld8060.wdf.sap.corp	2500	VHOST=0
  17.  
  18. pwdf2310_BIN_53
  19. DIAG	pwdf2310.wdf.sap.corp	3253	LB=10
  20. DIAGS	pwdf2310.wdf.sap.corp	3253	p/secude:CN=BIN, O=SAP-AG, C=DE
  21. RFC	pwdf2310.wdf.sap.corp	3353
  22. RFCS	pwdf2310.wdf.sap.corp	4853	p/secude:CN=BIN, O=SAP-AG, C=DE
  23. HTTP	pwdf2310.wdf.sap.corp	8080
  24. HTTPS	pwdf2310.wdf.sap.corp	8443
  25. SMTP	pwdf2310.wdf.sap.corp	25053
  26. HTTP	pwdf2310.wdf.sap.corp	8080	VHOST=0
  27. HTTPS	pwdf2310.wdf.sap.corp	8443	VHOST=0
  28. SMTP	pwdf2310.wdf.sap.corp	25053	VHOST=0
End of the code.

Here, three AS ABAP instances are configured on different hosts. They have different capacities and protocols.

The information needed for a load balancer is the capacity in the first line and the ports for HTTP and HTTPS..

Dual-Stack System

Syntax Syntax

  1. version 1.2
  2. us4251_BCO_27
  3. DIAG	us4251	3227	LB=8
  4. RFC	us4251	3327
  5. HTTP	us4251.wdf.sap.corp	50027
  6. HTTPS	us4251.wdf.sap.corp	44327
  7. SMTP	us4251.wdf.sap.corp	25027
  8. J2EE	us4251.wdf.sap.corp	50027	LB=1
  9. J2EES	us4251.wdf.sap.corp	44327	LB=1
  10. P4	us4251.wdf.sap.corp	52704	LB=1
  11. IIOP	us4251.wdf.sap.corp	52707	LB=1
  12. TELNET	us4251.wdf.sap.corp	52708	LB=1
  13. HTTP	us4251.wdf.sap.corp	52700	VHOST=0
  14. HTTPS	us4251.wdf.sap.corp	44327	VHOST=0
  15. SMTP	us4251.wdf.sap.corp	25027	VHOST=0
  16.  
  17. bcomain_BCO_27
  18. DIAG	bcomain	3227	LB=20
  19. RFC	bcomain	3327
  20. HTTP	bcomain.wdf.sap.corp	52700
  21. HTTPS	bcomain.wdf.sap.corp	44327
  22. SMTP	bcomain.wdf.sap.corp	25027
  23. J2EE	bcomain.wdf.sap.corp	52700	LB=2
  24. J2EES	bcomain.wdf.sap.corp	44327	LB=2
  25. P4	bcomain.wdf.sap.corp	52704	LB=2
  26. P4S	bcomain.wdf.sap.corp	52705	LB=2
  27. IIOP	bcomain.wdf.sap.corp	52707	LB=2
  28. TELNET	bcomain.wdf.sap.corp	52708	LB=2
  29. HTTP	bcomain.wdf.sap.corp	52700	VHOST=0
  30. HTTPS	bcomain.wdf.sap.corp	44327	VHOST=0
  31. SMTP	bcomain.wdf.sap.corp	25027	VHOST=0
End of the code.

This system has two instances providing ABAP and Java. The first one has ABAP capacity 8, Java capacity 1, whereas the second has 20 and 2. If you do load balancing for a dual-stack system, you can take one of the values as capacity or do a calculation.