Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
11,356
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:
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)
         
          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.
                              
   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
         
   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:
                   
                    ii. After the column of LoadModule statements, paste the following:
                        
        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.

7 Comments