Skip to Content
In a complex customized landscape, it can be an inherent requirement to deploy RESTful Webservice in a clustered environment with a load balancer. RESTful Webservice is deployed on WACS on BI Platform 4.1 and not tomcat. Customers are aware about how to setup load balancing for popular application server – web server combination but often lack information on how to achieve similar setup using WACS. So, In this blog, I will try to walk you through a step-by-step process on how to set up a load balancer in front of a basic BOE system with two clustered instances of REST Webservices on WACS illustrated in the following diagram:
Diagram1.png
The load balancer will act as a reverse proxy so that the host specific information of the WACS instance that the request goes through is hidden from the end client.
*NOTE:
        We do not support sticky sessions, meaning that because RESTWebservices is not configurable to create/write to cookies, the end client has no control over which WACS server is used (even after the first http request is sent). RESTWebservices is, by definition, stateless. Hence, it does not save any information.
Prerequisites
  1. Four separate machines:
               a. VMBOESRVR – This is where you install BOE
               b. VMWEBAP1 – This is where you install JUST RESTWebservices
               c. VMWEBAP2 – This is where you install JUST RESTWebservices
               d. VMHTTPSRVR – This is where you install the load balancer. This example uses Apache HTTP Server software
   2.  All required software
    1. SAP BOE
    2. Apache HTTP Server, available for download at the Apache Website
Steps
  1. Install BOE on VMBOESRVR machine (If you are doing a custom install, make sure that REST Webervice and WACS is selected)
  2. Custom install BOE on VMWEBAP1 machine. SELECT ONLY RESTWEBSERVICES!! Specify VMBOESRVR CMS information (make sure to specify a different SIA name for each separate host)
  3. Custom install BOE on VMWEBAP2 machine. SELECT ONLY RESTWEBSERVICES!! Specify VMBOESRVR CMS information (make sure to specify a different SIA name for each separate host)
  4. Go into VMBOESRVR CMC->Servers->Core Services and right click the new WebApplicationContainerServer. Select “Properties” (The steps below needs to be performed for SIA of both the WACS node)
          WACSproperties.png
          a. In the properties check the box next to “Allow HTTP Through Proxy”
               i. Specify proxy host and proxy port.
      1. In this example proxy host can be either VMHTTPSRVR, if you have correctly modified your hosts files, otherwise enter the IP address of VMHTTPSRVR.
      2. If you do not specify the proxy host, WACS will not reverse proxy the request body, in this case for RESTWebservices, the returned xml feed.
                           a. If you want the links to be accessible by a client whose hosts file has not been modified, you should use the IP address of VMHTTPSRVR rather than the name “VMHTTPSRVR”
                           b. The proxy port is the port that Apache HTTP Server is listening on. By default this should be 80
                                   i.   Select an HTTP port for WACS to listen on. This is where all HTTP requests for the WACS server should be sent.
                                   ii.  You can leave it as 6406 or change it to something else. We’ll call this number xxxx.
                                   iii. Save & Close the WACS properties page.
                               WACSconfiguration.png
   5.  In the CMC, go to Applications and right click “REST Web Service”. Select “Properties”
        a. Set the access URL to the following:
               http://<LOAD BALANCER SERVER>:<LOAD BALANCER LISTENING PORT>/biprws
              In this example I’ve set the Access URL: http://VMHTTPSRVR:80/biprws
          /wp-content/uploads/2015/04/restproperties_675808.png
   6.  Go into VMBOESRVR CMC->Servers->Core Services and restart the WACS
   7.  More information regarding WACS configuration options can be found in the BI Platform admin guide available on SAP help portal
   8.  Install Apache HTTP Server software on VMHTTPSRVR machine. Default install will do.
               a. Open httpd.conf file for edit in folder <Apache Install ROOT>/conf/httpd.conf
                    i. Uncomment the following lines:
                    LoadModule.png
                    ii. After the column of LoadModule statements, paste the following:
                         Mod_Proxy.png
        1. The ProxyPass statement maps any incoming requests to http://VMHTTPSRVR/biprws to the load balanced WACS instances defined in the <Proxy> tags
        2. Make sure to change the following if need be:

                                   a. VMWEBAP1:6406 – Host name or IP address and listening port xxxx of WACS instance #1 from above.

                                   b. VMWEBAP2:6406 – Host name or IP address and listening port yyyy of WACS instance #2 from above.

                            3. The Apache docs are more detailed and contain more configuration options. Further Apache HTTP Server documentation can be found at the Apache Documentation site.

                                 NOTE: This basic Apache load balancer configuration uses round robin load balancing techniques

   9. Test the configuration:

           a. Ensure that all BOE servers (including WACS instances on separate machines) are running and enabled.

           b. Start up Apache HTTP Server on VMHTTPSRVR. Make sure it started properly. If there are errors check logs and fix as needed.

           c. You can check the status of the clustered WACS instances by going to:  http://VMHTTPSRVR/balancer-manager

           d. You can access the RESTWebservices at: http://VMHTTPSRVR/biprws

           e. Try to use REST Client Plugin to logon and access the infostore through http://VMHTTPSRVR/biprws/logon/long

                    i. Check the links in the infostore to ensure correct reverse proxy forwarding.

Additional NOTE:

You can disable WACS of VMBOESRVR if it is not required to be accessed directly.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Jan Froehlich

    Thank you Sumitesh. Indeed useful.

     

    Is it a requirement to install WACS on additional servers? We often see installations with a clustered setup where we already have 2 (or more) WACS servers installed on the different nodes.

    (0) 
    1. Sumitesh Ranjan Srivastava Post author

      Thanks Jan. No, there is no such inherit requirement from the platform but rather it would depend on your system landscape. It can be useful if you have a requirement for load balancing (presence of WACS on different clustered nodes does not automatically do the load balancing for REST WebService requests) or even in a DMZ setup (of course coupled with other settings mentioned in the admin guide).

       

      Regards

      Sumitesh

      (0) 
  2. Dafang Zhang

    This is a good post!

    However, “SELECT ONLY RESTWEBSERVICES” doesn’t seem to be enough, at least not for 4.1 SP06.  The installation will be successfully, the WACS server will enter into “Running with Errors” state, and properties page of the WACS will show “Restful web service is not started” red text.

    To resolve this issue, use the installer to add Platform Processing Services, per the following SAP KBA Note:

    2182970 – Web Application Container Server is Running with Errors after installing a patch in BI 4.1 SP5

    (0) 

Leave a Reply