Pythian Blog: Technical Track

Configuring software loadbalancer for Oracle E-Business Suite

HAProxy (high availability proxy) is a free, open source software that provides TCP & HTTP-based load balancing capabilities for various applications. As it supports session persistence by enabling the sticky bit, this software can be used with Oracle E-Business Suite as a software-based load balancing application that helps to achieve high scalable and availability application services. The following steps help to configure HAProxy load balancer services. For configuration purposes, the following names were used to demonstrate this. Server ebs-lb.example.com: Linux server acting as a load balancer and running HAProxy and would listen to E-Business suite on 80 port. Servers ebsapps01.example.com, ebsapps02.example.com: E-Business suite middle tiers and running Apache on 8000 port. Server ebsdb.example.com: E-Business suite database tier.     1. Set up HAProxy utility as the root user on load balance servers.
[root@ebs-lb ~]# yum install haproxy -y
 [root@ebs-lb ~]# chkconfig haproxy on
2. Configure syslogd service for HAProxy. Save /etc/rsyslog.conf after making the changes below and restart the service. All incoming requests would be logged into /var/log/haproxy.log and can be used for any troubleshooting.
[root@ebs-lb ~]# cp -p /etc/rsyslog.conf /etc/rsyslog.conf_$(date + %d%m%y)
 [root@ebs-lb ~]# view /etc/rsyslog.conf
 From:
 #$ModLoad imklog # reads kernel messages (the same are read from journald)
 To:
 $ModLoad imklog # reads kernel messages (the same are read from journald)
 From:
 #$ModLoad imudp
 #$UDPServerRun 514
 To:
 $ModLoad imudp
 $UDPServerRun 514
 
 [root@ebs-lb ~]# echo "local2.* /var/log/haproxy.log" > /etc/rsyslog.d/haproxy.conf
 [root@ebs-lb ~]# systemctl restart rsyslog
3. Replace the HAProxy default config to loadbalance E-Business suite middle tier. Save /etc/haproxy.cfg after making the below changes and bounce HAProxy service.
[root@ebs-lb ~]# cp -p /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg_$(date + %d%m%y)
 [root@ebs-lb ~]# vi /etc/haproxy/haproxy.cfg
 From:
 option forwardfor except 127.0.0.0/8
 To:
 option forwardfor except 127.0.0.0/8 header ClientIP
 
 From:
 frontend main *:5000
 acl url_static path_beg -i /static /images /javascript /stylesheets
 acl url_static path_end -i .jpg .gif .png .css .js
 
 use_backend static if url_static
 default_backend app
 To:
 frontend main
 bind 0.0.0.0:80
 
 default_backend ebs
 
 From:
 backend app
 balance roundrobin
 server app1 127.0.0.1:5001 check
 server app2 127.0.0.1:5002 check
 server app3 127.0.0.1:5003 check
 server app4 127.0.0.1:5004 check
 To:
 backend ebs
 balance roundrobin
 cookie LB insert
 server app ebsapps01:8000 cookie ebs-app1 check
 server app ebsapps02:8000 cookie ebs-app2 check
 
 [root@ebs-lb ~]# haproxy -f /etc/haproxy/haproxy.cfg -c
 [root@ebs-lb ~]# service haproxy start
4. Configure E-Business suite middle tier to listen on HAProxy server. Change the following context file variables and run autoconfig on both E-Business suite middle tiers. Port 80 being http default, URL config is not populated with port details.
[applmgr@ebsapp01/02 ~]$ $ADMIN_SCRIPTS_HOME/adstpall.sh
 [applmgr@ebsapp01/02 ~]$ vi $CONTEXT_FILE
 
 
 Variable Name Configuration values
 s_webentryurlprotocol http
 s_webentryhost ebs-lb
 s_webentrydomain example.com
 s_active_webport 80
 s_login_page https://ebs-lb.example.com/OA_HTML/AppsLogin
 s_endUserMonitoringURL https://ebs-lb.example.com/oracle_smp_chronos/oracle_smp_chronos_sdk.gif
 s_external_url https://ebs-lb.example.com
 
 [applmgr@ebsapp01/02 ~]$ $ADMIN_SCRIPTS_HOME/adautocfg.sh
 [applmgr@ebsapp01/02 ~]$ $ADMIN_SCRIPTS_HOME/adstrtal.sh
With the above steps, we could configure HAProxy load balancer for E-Business suite with no additional cost to the load balancer. Also, Keepalived utility can be used with HAProxy for configuring the virtual IP and enable the failover in case of an HAProxy server failure to provide uninterrupted services to the users.

No Comments Yet

Let us know what you think

Subscribe by email