Apache2.0 + Weblogic8.1 server Load balancer!

Source: Internet
Author: User

Load Balancing is not really a simple implementation.

Environment:

Windows XP

WebLogic 8.1.5

Apache_2.0.59-win32-x86-no_ssl.msi

1. Create domian on multiple servers, deploy the same application, and connect the application to the same database. multiple domains must be independent of each other and can run normally separately. When the testdl. War application is used for testing, "this is test page!" is printed on the page and the Weblogic console !" (The process of creating domain, configuring connection pools, data sources, and publishing programs is not described)

2. Install apache2.0 on another server as a proxy server. The installation process is not described.

3. After Apache is installed, port 80 is used by default. If you need to change the port later, you can modify the port numbers in the listen and servername items in the conf/httpd. conf files under the Apache installation directory. You can test whether the installation is successful through http: // localhost.

4. Edit the httpd. conf file and add include CONF/weblogic. conf after line 80 of listen.

Set the values of the following attributes:

Timeout 300

Keepalive on

Maxkeepaliverequests 0

Threadsperchild 1920

Maxrequestsperchild 10000

Loglevel Error

Among them, threadsperchild and maxrequestsperchild are set to solve the following error: Action. C (10): continuing after error-26609: HTTP status-code = 503 (service temporarily unavailable.

Remove the comments about the configuration information of the server-Status Configuration Module to make it take effect. For example

<Location/Server-status>

Sethandler server-status

Order allow, deny

Deny from nothing

Allow from all

</Location>

Remove the # number before the following four statements:

# Loadmodule proxy_module modules/mod_proxy.so
# Loadmodule proxy_connect_module modules/mod_proxy_connect.so
# Loadmodule proxy_http_module modules/mod_proxy_http.so
# Loadmodule proxy_ftp_module modules/mod_proxy_ftp.so
# Loadmodule rewrite_module modules/mod_rewrite.so

5. Copy mod_wl_rjso under the c: \ Bea \ weblogic81 \ Server \ bin directory to the Apache installation directory c: \ Program Files \ apache group \ apache2 \ conf.

6. Create a weblogic. conf file with the following content:

Loadmodule weblogic_module modules/mod_wl_20.so
<Location/testdl>
Sethandler Weblogic-Handler
Weblogiccluster 82.0.98.237: 7001, 82.0.176.3: 7001
Debug on
Debug all
Debugconfiginfo on
Wllogfile c: \ WL. Log
Dynamicserverlist off
Keepaliveenabled on
Keepalivesecs 30
</Location>

Where:/testdl is the context root of the application

82.0.98.237: 7001, 82.0.176.3: 7001 is the IP address and port number of two web servers, separated by commas.

Set dynamicserverlist to off. When Server Load balancer is performed on requests proxy by the plug-in, the dynamic cluster list is not used, but the static list specified by the weblogiccluster parameter is used.

Dynamicserverlist, keepaliveenabled, and keepalivesecs are set to solve the following error: No backend server available for connection: timed out after 10 seconds or idempotent set to off.

7. Restart the apache service and Use http: // localhost/testdl on the proxy server to test the Server Load balancer effect.

Note:

1. The latest version of apache2.2 is incompatible with weblogic8 and must be version 2.0.x.

2. the Apache proxy server is responsible for distributing requests. When the traffic volume is too large, the pressure on the Apache proxy server increases. To ensure that requests are not blocked, A high-configuration server is used as the Apache proxy, and the proxy server is no longer used as the web server.

2. When using http: // localhost/testdl on the proxy server to access the application, only one server is displayed with logs. In this case, a new ie window is opened and accessed again, the log is displayed on the other server. If you click Refresh in the same window, the load balancing effect is not displayed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.