[JDE] Create a JDE Load Balancer using Apache’s httpd

How to setup a HTTP Load Balancer for JDE using the open source Apache httpd webserver.

Your Apache must have the following core modules enabled: mod_rewrite, mod_headers, mod_proxy, mod_proxy_http, mod_proxy_balancer

You may need to adjust the following settings:

  • ServerName
  • ServerAlias
  • DocumentRoot
  • <Directory> (to match DocumentRoot)
  • BalancerMember (list the URL for each of your JDE instances)
  • Set-Cookie Max-Age (should match your JDE web session timeout)


Your new balancer does not have a homepage, instead it will automatically redirect any requests to /jde.

Caution regarding One View Reporting [Updated 3/27/2017]
If you use One View Reporting, be sure to use Server Manage to configure the setting One View Reporting: Target JAS Server and Port for each webserver running behind the load balancer.

For more information regarding One View Reporting with an HTTP Load Balancer, please see Oracle Support document: E1: OVR: One View Report Output Displays “Error Occurred” or “No Data to Display” Message when Using Load Balancer (Doc ID 1516935.1)

# JDE Balancer Virtual Host Template
# NOTE:  This uses a custom LogFormat called "jdebalancer" that is tuned for performance monitoring. You can replace it with any other log format.

<VirtualHost *:80>
    ServerAdmin webmaster@jdebalancer.myCompany.com
    # Fully-qualified server name
    ServerName jdebalancer.myCompany.com
    # Additionally, specify the unqualified server name and any other DNS aliases
    ServerAlias jdebalancer
    ServerAlias jde

    # Error Log location
    ErrorLog /var/log/apache2/jdebalancer.myCompany.com-error_log
    # Access Log location
    CustomLog /var/log/apache2/jdebalancer.myCompany.com-access_log common

    LogLevel warn
    HostnameLookups Off
    UseCanonicalName Off
    ServerSignature On

    # DocumentRoot, in case you have any files you want to serve up.
    DocumentRoot /srv/www/htdocs/jdebalancer
    # This should match DocumentRoot
    <Directory "/srv/www/htdocs/jdebalancer">

        Options Indexes FollowSymLinks

        # Enable .htaccess overrides (this is not required!)
        AllowOverride All


# JDE Proxy & Load Balancer Setup
    # Extra-long timeouts because JDE responses frequently take > 1 minute (NOTE: This matches the proxy timeout value, which is specified below)
    TimeOut 1800

    # The beast
    RewriteEngine on
    # Disable Forward Proxies
    ProxyRequests Off
    # Preserve HTTP Request Hostname when forwarding requests to back-end hosts
    ProxyPreserveHost On

    # Redirect root requests to /jde/E1Menu.maf
    RewriteRule ^/$ /jde/E1Menu.maf [R,END]

    # Redirect logout requests to /logout/
    RewriteCond %{QUERY_STRING} ^jdeLoginAction=LOGOUT&RENDER_MAFLET=E1Menu$
    RewriteRule ^/jde/E1Menu.maf$ /logout/? [R,END]
    # Enable HTTP Hostname rewriting for replies from back-end hosts
    ProxyPassReverse / balancer://jdebalancer
    # Defines proxy "jdebalancer" and each back-end host
    <Proxy "balancer://jdebalancer">
        # Balancer will look at cookie named "JDEBALANCERID"
        ProxySet stickysession=JDEBALANCERID timeout=1800
        # List the URL for each JDE Web Instance here and assign a UNIQUE route name
        BalancerMember http://jdewebpd1:8080/jde route=jdewebpd1_8080
        BalancerMember http://jdewebpd2:8080/jde route=jdewebpd2_8080
        BalancerMember http://jdewebpd2:8081/jde route=jdewebpd2_8081

    # /jde - All requests to /jde are sent to the load balancer and proxied to a JDE Web Instance
    <Location /jde>
        # Set a cookie "JDEBALANCERID" to store the route name. Session cookie will timeout after 20 mins (supposeldy not compatible with IE)
        Header add Set-Cookie "JDEBALANCERID=.%{BALANCER_WORKER_ROUTE}e; path=/; Max-Age=1200"

        # Proxy all requests for to the "jdebalancer" using JSESSIONID for stickiness
        ProxyPass balancer://jdebalancer
    # /logout - Clear load balancing cookie
     <Location /logout>
        Header always set Set-Cookie "JDEBALANCERID=logout; path=/"
        Redirect 302 /logout /
    # /balancer-manager - Web GUI Administration
    <Location /balancer-manager>
        # Enable balancer-manager
        SetHandler balancer-manager


Leave a Reply

Your email address will not be published. Required fields are marked *