If you are working with Virtual Hosts in the Internet Communication Framework, you can configure the system so that a request to a specific virtual host, which is maintained in transaction SICF, is forwarded.
In the profiles of the application servers set the virtual hosts using the parameters is/HTTP/virt_host_<xx> and is/SMTP/virt_host_<xx>, whereby <xx> is the index of the virtual host.
Configure the component that is responsible for load balancing. This is normally the SAP Web Dispatcher, but it could also be the Message Server. Specify that incoming requests to a service (port) are to be forwarded to the appropriate virtual host index on an application server.
The parameter for this setting is icm/server_port_<xx>=....,VHOSTIDX=<i>.
If VHOSTIDX=<i> is defined, incoming requests on this service are forwarded to an application server that has a service actively running for the virtual host with the index <i>.
The parameter for the virtual host 0 should always be set:
is/HTTP/virt_host_0 = *:*;
Therefore VHOSTIDX=0 can also be omitted. In this case all HTTP ports are possible targets for the request.
The example below shows the interaction of the parameters in the profiles of the different components.
Note
With HTTP load balancing using the SAP Message Server instead of the icm/* parameter in the Web Dispatcher, you have to use the ms/server_port_<xx> parameter in the Message Server. You can view the indexes of the virtual hosts in the Message Server Monitor in the service display.
Component |
Profile Settings |
---|---|
Application server 1 (AS1) |
icm/server_port_0 = PROT=HTTP,PORT=80 icm/server_port_1 = PROT=HTTP,PORT=1080 icm/server_port_2 = PROT=HTTP,PORT=8080 icm/server_port_3 = PROT=HTTP,PORT=10000 is/HTTP/virt_host_0 = *:*; is/HTTP/virt_host_1 = *:1080; is/HTTP/virt_host_2 = *:8080;*:10000; |
Application server 2 (AS2) |
icm/server_port_0 = PROT=HTTP,PORT=80 icm/server_port_1 = PROT=HTTP,PORT=1080 is/HTTP/virt_host_0 = *:*; is/HTTP/virt_host_1 = *:1080; |
Application server 3 (AS3) |
icm/server_port_0 = PROT=HTTP,PORT=80 is/HTTP/virt_host_0 = *:*; |
SAP Web Dispatcher |
icm/server_port_0 = PROT=HTTP,PORT=1000, VHOSTIDX=1 icm/server_port_1 = PROT=HTTP,PORT=1001, VHOSTIDX=2 icm/server_port_2 = PROT=HTTP,PORT=1002 |
Incoming requests on the SAP Web Dispatcher can be distributed to the application servers in the following way:
Web Dispatcher Port Where Request Enters |
Possible Application Servers/Ports |
---|---|
1000 |
AS1:1080 AS2:1080 |
1001 |
AS1:8080, AS1:10000 |
1002 |
AS1:80, AS1:1080, AS1:8080, AS1:10000 AS2:80, AS2: 1080 AS3:80 |
Note
The virtual host is determined in ICF still with the parameter is/HTTP/virt_host_<xx>.
All servers should have the same values for is/HTTP/virt_host_<xx>.
If there is no application server with virt host index <i>, the request cannot be forwarded by the Web Dispatcher or Message Server.