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:
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
Indicates whether the SPS supports protocols other than HTTP. Specify one of the following values:
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.
Indicates that only the HTTP protocol is supported.
Sets the minimum number of connections to a single destination server that are available for processing user requests.
Default: 4
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.
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
Sets the timeout unit to seconds or minutes.
Default: Minutes
Defines the time, in minutes, the system waits before closing idle connections in the connection pool.
Default: 1
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.
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:
Indicates that the SPS makes attempts indefinitely.
Indicates that the SPS makes three attempts.
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.
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
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
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"
Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |