Load Balancer For OHS

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Load balancer for OHS

1. GO to httpd.conf and make sure mod_proxy, mod_proxy_balancer are included.

2. Add below in httpd.conf and restart OHS

<Proxy balancer://clusterABCD>

BalancerMember http://<host>:port

BalancerMember http://<host>:port

BalancerMember http://<host>:port

Order allow,deny

Allow from all

</Proxy>

ProxyPass / balancer://clusterABCD/

Below cluster was created and tested.

<Proxy balancer://clusterABCD>

BalancerMember http://slc11coo.us.oracle.com:16663

BalancerMember http://slc15bmx.us.oracle.com:16661

BalancerMember http://slc12own.us.oracle.com:16661

Order allow,deny

Allow from all

</Proxy>

ProxyPass / balancer://clusterABCD/

After OHS restart request were routed to tomcats in the defined cluster
<VirtualHost *:80>
ProxyRequests off

ServerName domain.com

<Proxy balancer://mycluster>
# WebHead1
BalancerMember http://10.176.42.144:80
# WebHead2
BalancerMember http://10.176.42.148:80

# Security "technically we aren't blocking


# anyone but this is the place to make
# those changes.
Require all granted
# In this example all requests are allowed.

# Load Balancer Settings


# We will be configuring a simple Round
# Robin style load balancer. This means
# that all webheads take an equal share of
# of the load.
ProxySet lbmethod=byrequests

</Proxy>

# balancer-manager
# This tool is built into the mod_proxy_balancer
# module and will allow you to do some simple
# modifications to the balanced group via a gui
# web interface.
<Location /balancer-manager>
SetHandler balancer-manager

# I recommend locking this one down to your


# your office
Require host example.org

</Location>

# Point of Balance
# This setting will allow to explicitly name the
# the location in the site that we want to be
# balanced, in this example we will balance "/"
# or everything in the site.
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/

</VirtualHost>

You might also like