Configure a Load Balancer to Support Failover

If you plan to install and configure more than one Essbase instance, to support failover, you need a front-end load balancer.

One option to consider for a load balancer is Oracle HTTP Server, because it is integrated with WebLogic and provides web services for Oracle Fusion Middleware.

Another option is Apache HTTPD Server.

Note:

If you're connecting through Smart View, using the URL /aps/SmartView, you need to change the URL. See Redirect to New Essbase Smart View Connection URL. Alternatively, you can configure redirection to the new URL on the web server. If you're using Oracle HTTP Server (OHS) or Apache HTTPD Server, redirect the URL while modifying the Oracle HTTP Server configuration, as described in this topic.

Oracle HTTP Server or Apache HTTPD Server

  1. First, install and configure Oracle HTTP Server or Apache HTTPD Server.
  2. Then, locate the file mod_wl_ohs.conf under your OHS domain root in the Oracle HTTP Server installation.

    Example:

    <OHS>/oracle/user_projects/domains/SOHSDomain/config/fmwconfig/components/OHS/ohs1/mod_wl_ohs.conf

    (where OHS is the home location of the Oracle HTTP Server installation).

  3. Insert the appropriate “weblogic_module” entries to mod_wl_ohs.conf. You don’t need to include eas and easconsole location entries unless you configured Essbase to use Essbase Administration Services on Host 1..
    <IfModule weblogic_module> 
    ConnectTimeoutSecs 10
    ConnectRetrySecs 2
    DebugConfigInfo ON
    WLSocketTimeoutSecs 2
    WLIOTimeoutSecs 300
    Idempotent ON
    FileCaching ON
    KeepAliveSecs 20
    KeepAliveEnabled ON
    DynamicServerList ON
    WLProxySSL OFF
    </IfModule>
    <Location /essbase>
    SetHandler weblogic-handler
    WebLogicCluster hostname:managed_server_port
    Debug ALL
    KeepAliveSecs 20
    KeepAliveEnabled ON
    DebugConfigInfo ON
    </Location>
    
    <Location /eas>
    SetHandler weblogic-handler
    WebLogicCluster hostname:eas_managed_server_port
    Debug ALL
    KeepAliveSecs 20
    KeepAliveEnabled ON
    DebugConfigInfo ON
    </Location>
    
    <Location /easconsole>
    SetHandler weblogic-handler
    WebLogicCluster hostname:eas_managed_server_port
    Debug ALL
    KeepAliveSecs 20
    KeepAliveEnabled ON
    DebugConfigInfo ON
    </Location>
    
  4. Edit the text you inserted into mod_wl_ohs.conf as follows:
    1. Edit <Location /Essbase> and replace hostname with the host name of Host 1 and managed_server_port with the Essbase WebLogic managed server port of Host 1. Using a comma separated format, add each additional Essbase managed server node that you plan to include in your cluster.

      Example:

      Let's say Essbase Host 1 runs on hostname1:managed_server_port1 and Host 2 runs on hostname2:managed_server_port2.

      To specify the servers in comma separated format, type (with no spaces added):

      hostname1:managed_server_port1,hostname2:managed_server_port2

      Do not add the prefix http or https to any host name.

    2. Edit <Location /eas> and replace hostname with the host name of Host 1 and eas_managed_server_port with the Essbase Administration Services WebLogic managed server port of Host 1.
    3. Edit <Location /easconsole> and replace hostname with the host name of Host 1 and eas_managed_server_port with the Essbase Administration Services WebLogic managed server port of Host 1.
  5. Save the configuration.
  6. Restart Oracle HTTP Server.
    1. To stop Oracle HTTP Server:
      1. Navigate to the bin directory under your OHS domain root.

        cd ./user_projects/domains/SOHSDomain/bin/
      2. Run the script to stop the OHS server component.

        ./stopComponent.sh ohs1
      3. In the background, run the script to stop the Node Manager.

        nohup ./stopNodeManager.sh &
      4. At the password prompt, enter the password that was entered during the installation.
    2. To start Oracle HTTP Server:
      1. Navigate to the bin directory under your OHS domain root.

        cd ./user_projects/domains/SOHSDomain/bin/
      2. In the background, run the script to start the Node Manager.

        nohup ./startNodeManager.sh &
      3. Run the script to start the OHS server component.

        ./startComponent.sh ohs1
      4. At the password prompt, enter the password that was entered during the installation.

    For Oracle HTTP Server SSL configuration, see Configure mod_wl_ohs.

Sample Code for SSL Offload using Apache HTTPD Server

Here is a sample HTTP configuration of SSL offload using Apache HTTPD Server, using SSL default port 443 (or any other selected port) for HTTPS offload redirect to Essbase.


#
# Macro file for the Essbase proxy settings
#

<Macro EssbaseProxy $TargetUrl>
ProxyPreserveHost On
ProxyPassReverse  / $TargetUrl/
ProxyErrorOverride Off

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} ^.+$ [NC]
RewriteRule ^/$                      
%{HTTP:X-Forwarded-Proto}://%{HTTP_HOST}/essbase/jet/ [L,R]
RewriteCond %{HTTPS} on
RewriteRule ^/$                       https://%{HTTP_HOST}/essbase/jet/ [L,R]RewriteRule ^/$                       http://%{HTTP_HOST}/essbase/jet/ [L,R]

RewriteCond %{HTTP:X-Forwarded-Proto} ^.+$ [NC]
RewriteRule ^/essbase(/)?$            
%{HTTP:X-Forwarded-Proto}://%{HTTP_HOST}/essbase/jet/ [L,R]
RewriteCond %{HTTPS} on
RewriteRule ^/essbase(/)?$            https://%{HTTP_HOST}/essbase/jet/ [L,R]RewriteRule ^/essbase(/)?$            http://%{HTTP_HOST}/essbase/jet/ [L,R]

# jsession redirect issue
RewriteCond %{HTTP:X-Forwarded-Proto} ^.+$ [NC]
RewriteRule ^/essbase/jet(;.*)?$      
%{HTTP:X-Forwarded-Proto}://%{HTTP_HOST}/essbase/jet/ [L,R]
RewriteCond %{HTTPS} on
RewriteRule ^/essbase/jet(;.*)?$      https://%{HTTP_HOST}/essbase/jet/ [L,R]RewriteRule ^/essbase/jet(;.*)?$      http://%{HTTP_HOST}/essbase/jet/ [L,R]

# Logout url
RewriteCond %{HTTP:X-Forwarded-Proto} ^.+$ [NC]
RewriteRule ^/essbase/jet/logout.html
%{HTTP:X-Forwarded-Proto}://%{HTTP_HOST}/essbase/jet/ [L,R]
RewriteCond %{HTTPS} on
RewriteRule ^/essbase/jet/logout.html https://%{HTTP_HOST}/essbase/jet/ [L,R]RewriteRule ^/essbase/jet/logout.html http://%{HTTP_HOST}/essbase/jet/ [L,R]

# Support redirect_uri logout for virtual hosts
RewriteCond %{QUERY_STRING} ^logout=$
RewriteCond %{HTTP:X-Forwarded-Proto} ^.+$ [NC]
RewriteRule ^/essbase/redirect_uri$
%{HTTP:X-Forwarded-Proto}://%{HTTP_HOST}/essbase/redirect_uri?logout=%{HTTP:X-Forwarded-Proto}://%{HTTP:X-Forwarded-Host}/essbase/jet/logout.html [L,R]
RewriteCond %{QUERY_STRING} ^logout=$
RewriteCond %{HTTPS} on
RewriteRule ^/essbase/redirect_uri$
https://%{HTTP_HOST}/essbase/redirect_uri?logout=https://%{HTTP_HOST}/essbase/jet/logout.html [L,R]
RewriteCond %{QUERY_STRING} ^logout=$
RewriteRule ^/essbase/redirect_uri$
http://%{HTTP_HOST}/essbase/redirect_uri?logout=http://%{HTTP_HOST}/essbase/jet/logout.html [L,R]

# Set weblogic specific headers
<If "%{HTTP:X-Forwarded-Proto} == 'https' || %{HTTPS} == 'on'">
  RequestHeader set WL-Proxy-SSL "true"
  RequestHeader set IS_SSL       "ssl"
</If>

<Location "/">
   Options -Indexes
   SetOutputFilter DEFLATE
   SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</Location>

<Location "/essbase">
   ProxyPass "$TargetUrl/essbase"
</Location>

<Location "/essbase/redirect_uri">
   ProxyPass "!"
</Location>

<Location "/weblogic/ready">
   ProxyPass "$TargetUrl/weblogic/ready"
</Location>

</Macro>