cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Load Balancing using Message Server

Former Member
0 Kudos

Hi Experts,

I am using a REST Web Service( Created in SICF ) to be consumed directly(using the URI) via external applications. We have Load Balancing configured in our landscape.

In the table RZLLITAB, the message server group is configured and is assigned to respective app servers.

Currently, we don't have a Web Dispatcher configured in our system, and i wanted to use the Message Server as a Load Balancer.

Since, REST Services are stateless, do i really need to install the Web Dispatcher in this case.?

Thanks

Sahil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi and Former Member,
Thank You for the valuable inputs. However, when i tried to do Test Load Balancin...

Does that mean that in actual Load Balancing, the URL will redirect to an error page?
How to test it live( I mean how to make the Central Instance BUSY so that it will be forced to redirect to other app servers)

Thanks

Sahil

cris_hansen
Advisor
Advisor
0 Kudos

Hello Sahil,

Please check the value of icm/host_name_full. You can also check table HTTPURLLOC. Also recommend reading the following SAP notes:

773830: FQHN determination in ICM

1164874: Services cannot be tested in transaction SICF

Kind regards,

Cris

Former Member
0 Kudos

Hi ,

Thank You for the prompt reply.

As i can see in my system,

CIS - Central Instance/Message Server/DB Server

CISAP1 - Additional App server used for Load Balancing

Value of SAPLOCALHOSTFULL in CIS is : CIS

There is no value called SAPLOCALHOSTFULL in CISAP1.

Value of icm/host_name_full or table entries in HTTPURLLOC in CIS : blank

Value of icm/host_name_full or table entries in HTTPURLLOC in CISAP1 : blank


So, when we do "Test Load Balancing", it calls "http://CISAP1:Port/sicf_service

and when i do Test Service(It Works) , the URL is "http://CIS.domain:Port/sicf_service


and when i change the 1st URL to http://CISAP1.domain:Port/sicf_service, it works.

So, Can you kindly suggest where do you think the mistake is in our case.

Note: If i ask silly questions, the most probable reason might be that I am not a BASIS guy and our BASIS team and I are new to ICF Load Balancing.



Thanks

Sourav Das

cris_hansen
Advisor
Advisor
0 Kudos

Hi Sourav,

Set the value of icm/host_name_full.

This should do the trick.

Kind regards,

Cris

Former Member
0 Kudos

Hi Cristiano,

Thank You very much.

Although, now i am faced with a new issue.

Whenever, i am calling "http://CIS.domain:Port/sicf_service" ( Hosted on Central Instance) , it is calling CIS only, and not redirecting to CISAP1, Does that mean the Load Balancing is not Working.

How, can we force CIS to be busy and load balancing to take place which will call the URL of the other app server CISAP1.

Thanks

Sahil

LutzR
Active Contributor
0 Kudos

Hi Sahil,

to test load distribution via message server you have to point to the message server's http/https port. You are probably currently pointing to the icm port, which will not distribute load. Therefore your tests are probably invalid.

So the correct load balancing URL would be:

http://CIS.domain:MSGhttpPort/sicf_service which will redirect to either

http://CIS.domain:ICMhttpPort/sicf_service or

http://CISAP1.domain:ICMhttpPort/sicf_service


Please be aware that both Christiano and I told you to better not ride a dead horse. Still you are asking for help to mount it.

Regards,

Lutz

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Lutz,
But, in my case, the message server is not redirecting even if i make the server busy.
The problem is that we are having some issues in configuring the Web Dispatcher aka Dead Horse and it would be really nice to have some good documents that will help us in configuring it properly.
Help us ride a new Horse!!!

Thanks

Sahil

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Sahil,

The Message Server will perform the load balance of the first request, if such request is made directly to the Message Server.

The "load balance mechanism" of the Message Server is to send an "HTTP Redirect" response to the client / browser.

After that, all requests made by the client will go to the same instance, always, unless the client opens a new connection to the Message Server again.

Direct connections to an instance (e.g., bypassing the Message Server) will not be load balanced.

This is the normal and expected behavior.

I strongly recommend using the Web Dispatcher.

In fact, using the Message Server is not supported if the application in use is statefull.

Read the SAP note 1040325.

Best regards,

Isaías

LutzR
Active Contributor
0 Kudos

Hi Sahil, of course I would love to help you getting your new horse up and runnning . As a starting point have a look at this great wik: Web Dispatcher Installation - Application Server Infrastructure - SCN Wiki.

If there are questions about this I would recommend to open a new thread.

Regards,

Lutz

Former Member
0 Kudos

Hi Lutz,

Thanks A Lot!!! I will send the feedback to our Basis Team and let's hope our Horse starts running and racing!!

cris_hansen
Advisor
Advisor
0 Kudos

Hello Sahil,

You can also read two SAP notes:

1040325: HTTP load balancing: Message Server or Web Dispatcher?

1055324: POST parameters lost during redirect

Kind regards,

Cris

LutzR
Active Contributor
0 Kudos

Hi Sahil,

message servers' HTTP load balancing works by redirecting to application servers via HTTP status code 302. So the client must be capable to react on this 302 to follow the redirect. You cannot take this for granted especially in machine-to-machine scenarios. Also I would guess that not all request data will survive the redirect (e.g. a POST payload).

So from what I learnt in the last years SAP considers HTTP load balanicing via message server as deprecated in general.

We typically install the SWD in the same OS instance as the central instance. It "does not eat much bread" (german proverb).
Regards,

Lutz