Previous Topic: Proxy and Redirect Settings in the server.conf File

Next Topic: Connection Pooling Recommendations

Proxy Service Configuration

The forwarding service of the SPS forwards requests to the appropriate destination servers according to the conditions and cases in the proxy rules XML configuration file. The parameters for this service are defined in the <Service name="forward"> section of the server.conf file.

Many of the directives manage the connection pool maintained by the SPS. These directives help improve server performance by maintaining connections and alleviating the overhead of establishing a new connection for each request to a destination server.

Additional directives define proxy filters. Proxy filters can be defined here to perform processing tasks before a request is passed to a destination server, and after the destination server returns data to the SPS. Filter names are unique.

The following is an excerpt of the <Service name="forward"> section.

Note: The excerpt does not include most of the comments that you see when you look at the actual server.conf file.

# Proxy Service
<Service name="forward">
class="org.tigris.noodle.Noodle"
protocol.multiple="true"
http_connection_pool_min_size"4"
http_connection_pool_max_size="20"
http_connection_pool_incremental_factor="4"
http_connection_pool_connection_timeout="1"
http_connection_pool_wait_timeout="0"
http_connection_pool_max_attempts="3"
http_connection_timeout="0"
# Proxy filters may be defined here to perform pre/post processing tasks.
# The following format must be used to configure filters: 
# filter.<filter name>.class=<fully qualified filter class name> (required)
# filter.<filter name>.init-param.<param name1>=<param value1> (optional)
# filter.<filter name>.init-param.<param name2>=<param value2>
# filter.<filter name>.init-param.<param name3>=<param value3>
# The following example illustrates the use of custom filters in a group
# Defines filter groups with valid Custom filter names.
#groupfilter.group1="filter1,filter2"
</Service>

The parameters in the forward section are:

class

Specifies the implementation that provides forwarding services for the SPS. Do not change this value. This value is only exposed to accommodate the rare occasion when a custom service can forward requests specified in the proxy rules XML configuration file.

Default: org.tigris.noodle.Noodle

protocol.multiple

Indicates whether the SPS supports protocols other than HTTP. Specify one of the following values:

true

Indicates that protocols other than HTTP are supported. Currently, only HTTPS is supported as an additional protocol in the SPS. True is the default value for this directive.

false

Indicates that only the HTTP protocol is supported.

http_connection_pool_min_size

Sets the minimum number of connections to a single destination server that are available for processing user requests.

Default: 4

http_connection_pool_max_size

Sets the maximum number of connections between the SPS and a destination server.

Default: 20

Important! Each connection established by the SPS creates a socket. For UNIX operating systems, if the maximum size of the connection pool is large, you can increase the limit on file descriptors to accommodate the large number of sockets.

http_connection_pool_incremental_factor

Sets the number of connections to a destination server that the SPS opens when all available connections are being used to process requests.

Default: 4

http_connection_pool_connection_timeout_unit

Sets the timeout unit to seconds or minutes.

Default: Minutes

http_connection_pool_connection_timeout

Defines the time, in minutes, the system waits before closing idle connections in the connection pool.

Default: 1

http_connection_pool_wait_timeout

Defines the time, in milliseconds, that the SPS waits for an available connection.

Default: 0

The default, 0, specifies that SPS waits for a connection until notified and invalidates the use of http_connection_pool_max_attempts.

http_connection_pool_max_attempts

Indicates the number of attempts that the system makes to obtain a connection. This directive is only applicable if wait timeout is not zero.

Default: 3

Specify one of the following values:

0

Indicates that the SPS makes attempts indefinitely.

3

Indicates that the SPS makes three attempts.

http_connection_timeout

Defines the time, in milliseconds, spent on host name translation and establishing the connection with the server when creating sockets.

Default: 0; indicates that the system does not enforce a limit.

Note: This timeout explicitly refers to the HTTP connection and not to the connection pool.

filter.filter name.class=fully qualified filter class name

Specifies the filter configured in the server.conf file for each unique filter that is invoked in the proxy rules.

Example: filter.PreProcess.class=SampleFilter

filter.filter name.init-param.param name1=param value1

Specifies the initialization parameters for a filter based on how the filters are defined using the Filter API. Configure the server.conf file to define parameters for each filter.

Example: filter.PreProcess.init-param.param1=value1

groupfilter.<groupname> = “filtername1,filtername2,…….filtername"

Specifies the filter groups to implement one or more filters for a given proxy rule. The SPS reads the filter names declared in the group filter and processes the filters in a chain. The groupfilter name can be similarly used as a filter name in proxyrules.xml. When SPS processes a group filter, the pre‑filters are processed before post filters even if the order in which theyare defined in the groupfilter is reverse.

The following limitations are applicable:

Example:

groupfilter.BatchProcess="SampleFilter1, SampleFilter2, SampleFilter3"