Tuesday, November 1, 2016

Using DynamicServerList to control routing from Oracle HTTP Server to Oracle WebLogic Server

The point of this blog post is to simply explain that when you configure httpd.conf in Oracle HTTP Server (OHS) or Apache, and even if you explicitly specify a single WebLogic host and port to route to (Scenario #2), OHS will still route to all nodes of your WebLogic cluster.

What you need to use is the DynamicServerList parameter.

Check out the three scenarios below.

Scenario #1: Load balancing between OHS and WebLogic using 'WebLogicCluster'

Your OHS/Apache configuration may look like this:
<Location /myapp>
  SetHandler weblogic-handler
  WebLogicCluster dev1.raastech.com:8011,dev2.raastech.com:8011
  WLProxySSL ON
  WLProxySSLPassThrough ON
</Location>

Thus, requests coming in to OHS will be routed across all nodes of your WebLogic cluster as shown:


Scenario #2: Attempting to single balance OHS and WebLogic using 'WebLogicHost' and 'WebLogicPort'

Your OHS/Apache configuration may look like this:
<Location /myapp>
  SetHandler weblogic-handler
  WebLogicHost dev1.raastech.com:8011
  WebLogicPort 7011
  WLProxySSL ON
  WLProxySSLPassThrough ON
</Location>

Even though the configuration explicitly states routing to a single WebLogicHost and WebLogicPort, requests coming in to OHS will still be routed across all nodes of your WebLogic cluster as shown:


Scenario #: Single balance OHS and WebLogic with 'DynamicServerList'

Your OHS/Apache configuration may look like this:
<Location /myapp>
  SetHandler weblogic-handler
  WebLogicHost dev1.raastech.com:8011
  WebLogicPort 7011
  DynamicServerList OFF
  WLProxySSL ON
  WLProxySSLPassThrough ON
</Location>

Simply adding the DynamicServerList parameter solves the problem in that all requests routed to OHS will now successfully go to a single WebLogic host/port as shown:



Applicable Versions:
  • Oracle HTTP Server 11g/12c
  • Oracle WebLogic Server 11g/12c

References:



1 comment:

oracleiamspot said...

Nice Expalnation with pictures.

Thanks for the reference.