Configure a Load-balancing Proxy Using the HTTP Connector
3.2. Configure a Load-balancing Proxy Using the HTTP Connector Read this section to configure a load balancing proxy that uses the JBoss HTTP Connector. Task: Configure a Proxy Server Listener Task Summary Follow this task to configure a JBoss Enterprise Web Server Apache service to act as a load-balancing proxy using the JBoss HTTP Connector. You must meet the following conditions before continuing with this task: Install JBoss Enterprise Web Server. Refer to JBoss Enterprise Web Server documentation for details. Install JBoss HTTP Connector modules. Refer to Chapter 2, Install Proxy Server Components for details Create a listen directive for the proxy server Edit the configuration file JBOSS_EWS_DIST/httpd/conf.d/JBoss_HTTP.conf and add the following: Listen IP_ADDRESS:PORT_NUMBER Where IP_ADDRESS is the IP address of a server network interface to communicate with the worker nodes, and PORT_NUMBER is the port on that interface to listen on. Note The port PORT_NUMBER must be open on the server firewall for incoming TCP connections. Example 3.1. Example Listen Directive Listen 10.33.144.3:6666 Create Virtual Host Add the following to the file JBOSS_EWS_DIST/httpd/conf.d/JBoss_HTTP.conf: Order deny,allow Deny from all Allow from 10.33.144. KeepAliveTimeout 60 MaxKeepAliveRequests 0 ManagerBalancerName mycluster AdvertiseFrequency 5 Where IP_ADDRESS and PORT_NUMBER are the values from the Listen directive, and mycluster is an arbitrary identifying name for the load-balancing cluster this proxy will serve. Optional: Disable Server Advertisement The presence of the AdvertiseFrequency directive, which is set to five seconds here, causes the server to periodically send server advertisement messages via UDP multicast. These server advertisement messages contain the IP_ADDRESS and PORT_NUMBER specified in the VirtualHost definition. Worker nodes that are configured to respond to server advertisements use this information to register themselves with the proxy server. To disable server advertisement, you must explicitly disable it. Add the following directive to the VirtualHost definition: ServerAdvertise Off If server advertisements are disabled, or UDP multicast is not available on the network between the proxy server and the worker nodes, you must configure worker nodes with a static list of proxy servers. Refer to Section 6.1, “Static Proxy Configuration� for directions. Restart the JBoss Enterprise Web Server Apache service Refer to the JBoss Enterprise Web Server documentation for detailed directions.