Configuring your web farm for load balancing
A web farm is a group of two or more web servers working together to handle browser requests. To use your web farm in a Crystal Enterprise environment, the Web Connectors that reside on each of the web servers need to be configured so they are aware of the Web Component Servers they should communicate with.
Note: Crystal Enterprise supports web farms with and without affinity masks.
After the connectors have been configured, they can load-balance requests between the Web Component Servers. When a web server establishes a connection with a Web Component Server, it uses a round robin algorithm to identify the next available Web Component Server. The only exceptions to this occur when a web server uses a CGI web connector, or if a session state was created on a previous request to the Web Component Server. The CGI web connector uses a random algorithm instead of a round robin algorithm because the connector doesn't have knowledge of the last Web Component Server it communicated with. Requests that had a session set up previously, must return to the same Web Component Server each time to ensure that subsequent requests have access to the previously set session state.
Both of the following procedures need to be completed for each web server in your Crystal Enterprise environment.
To specify the Web Component Server the web server should use
This procedure assumes that the Web Connector has been installed on each of the web server machines. For more information on performing a custom installation, see the Crystal Enterprise Installation Guide.
- Start the CCM.
Click Configure Web Connector.
- Click Add in the Web Component Servers area.
- Enter the IP address or host name where the Web Component Server you would like to communicate with resides.
- Enter the port number.
This is the Web Component Server port number.
- Click OK.
The Web Component Server is added to the list.
Note: Repeat this procedure for each Web Component Server the web server should have access to.
To specify the virtual directory the Web Connector should use
- Click Add in the Path Mapping area.
- Enter the virtual path of the web server.
- Enter .rpt and .csp as the extensions.
- Enter the actual path of the Web Component Server.
- Click OK.
Note:
- For more information on virtual directories and path mapping, see Troubleshooting path mappings.
- Crystal Enterprise dynamically maintains the list of available WCS machines, so your web server should respond to your changes within a maximum of several minutes (without restarting). However, if you are running Apache as your web server, you must instruct Apache to reinitialize its child worker processes after you add or remove
WCSHOSTS
to the Web Connector configuration files. You can generally do this with one of the following commands:
kill -HUP `cat <absolute path to httpd.pid file>`
kill -USR1 `cat <absolute path to httpd.pid file>`
Consult the Apache documentation for more information.