• No results found

3. SERVLETEXEC/AS: APPLICATION SERVER (WINDOWS)

3.6 C ONFIGURING WEBADAPTER . PROPERTIES

All ServletExec/AS native adapters can be configured using the webadapter.properties file. The file is always put in the config directory of your ServletExec installation by default, but it can be put in alternate locations. See the information in this document regarding your brand of web server for specifics on specifying an alternate location.

The webadapter.properties file is used by the ServletExec/AS native adapter, no matter which brand of web server is used. The top of the webadapter.properties file contains extensive comments about the various properties that can be set in that file. This section will describe some of the properties that can be controlled from this file. Property names are always set up in the form of:

servletexec.<instance name>.<property name>

The <instance name> portion of the property name is used to “group” sets of properties together. Each “grouping” of properties applies to 1 single SE AS Instance.

Properties in this file are used to modify connection pooling between the web server adapter and the ServletExec AS Instance(s), find ServletExec instances that are set up to

handle the incoming requests, and forward the request to instances set up to handle specific hostnames and/or specific web applications that are deployed.

3.6.1.1 Connection Pooling Between the Web Server Adapter and ServletExec

The installer automatically enables connection pooling between the web server adapter and ServletExec, using default settings. The purpose of this connection pooling is to improve performance through better resource management.

You can change the default settings by modifying the configuration file as explained below. The two parameters that provide the connection pooling are: pool max idle (sets maximum number of idle connections that can be in the pool… default setting is 10) and pool increment. (sets the number of idle connections to be added to the pool when the pool is empty and another request is received… default setting is 5). Once the pool max idle limit is reached, freed connections will be disconnected.

A good guideline for changing these parameters from their default settings would be to set the pool max idle to your average number of connections, and to set the pool increment to the average spike number of connections.

To modify Connection Pooling for ServletExec/AS

• Add the following to the end of the webadapter.properties file on two separate lines:

servletexec.<instance-name>.pool-increment=<value>

servletexec.<instance-name>.pool-max-idle=<value>

3.6.1.2 Hosts

The hosts property is used to find all ServletExec AS instances that are configured to process requests for the designated host. The host name is taken from the HOST header field of the HTTP request. The hosts property should contain a comma separated list of IP addresses and/or hosts names. The special value all can be used to indicate that all hosts should be processed by the specified instance name.

To update the hosts property in webadapter.properties

• Use the following form:

servletexec.<instance-name>.hosts=www.newatlanta.com

3.6.1.1 ServletExec Instances

The instances property contains the IP address and port number of 1 (not multiple) ServletExec AS instance. This is used by the adapter for forwarding HTTP requests to that instance. Each instance must contain a unique IP address and port number

combination. The default value is 127.0.0.1:8888.

To update the instances property in webadapter.properties

• Use the following form:

servletexec.<instance-name>.instances=127.0.0.1:8888

3.6.1.2 Global Properties

In addition to the per-instance properties there are also a few global properties.

• servletexec.aliasCheckInterval

The default value is 10 (measured in seconds).

Setting it to -1 turns it off, so that there is no request-time polling.

An example of using this property in webadapter.properties is:

servletexec.aliasCheckInterval=20

This global property governs how often the adapter will ping/query the SE AS instances (ASIs) that are defined in that file, to ask them if there are any changes to the aliases (webapp context paths, uri mappings for security, filters, servlets, etc...). The adapter stores a local copy of such mappings in what’s referred to as an Alias Cache (1 alias cache per ASI) and periodically attempts to update that cache (at request time) if warranted.

If an ASI is not running and the adapter tries to ping/query it, there may be a timeout delay before the socket knows that there is nothing at the

other end to respond to the ping/query. This is usually 1 second, but may differ depending on OS, and other factors. If there are several ASI's that are not running or are otherwise unreachable then the delay is increased proportionally (1 second delay for each ASI that's down). This situation can be avoided by enabling the multiInstanceMode property (see next bullet).

For additional details about the aliasCheckInterval property, please see:

http://www.newatlanta.com/c/support/servletexec/self_help/faq/detail?faqId=259

• servletexec.multiInstanceMode The default value is disabled.

An example of using this property in webadapter.properties is:

servletexec.multiInstanceMode=enabled Enabling multi-instance mode will cause the adapter to:

- only ping an unresponsive ASI every aliasCheckInterval seconds (rather than continually trying to ping it on every request in an attempt to update its outdated/expired alias cache).

- clear the in-memory alias cache for any ASI that becomes unresponsive.

This provides better support for using SE in a failover/clustered environment. It allows the request to “filter down” to the other ASI's or the webserver itself rather than giving Failed To Connect to ServletExec messages over and over.

Just be aware that you may get 404 Not Found responses in this case.

To confirm that your adapter is running in multi-instance mode, look for the presence of the following line in your adapter's startup messages:

This adapter will run with multi-instance optimizations.

Related documents