Websphere Routing a Request using Plugin-cfg.xml

Posted By Sagar Patil

The Web Server plug-in uses an XML configuration file to determine whether a request is for the Web Server of the application server. When a request reaches the Web Server, the URL is compared to those managed by the plug-in. If a match is found, the plug-in configuration file contains the information needed to forward the request to the web container using the web container inbound chain.

For example lets say you make a request to http://localhost/help/SessionAffinityServlet URL, so the Web Server Plugin will check /prhelp URL to find out how it is should be handled.  It will check if there is matching UriGroup element in plugin-cfg.xml

<UriGroup Name=”default_host_test_cluster_URIs”>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/util/*”/>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/web/*”/>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/help/*”/>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/sysmgmt/*”/>

In this case it knows that /help/* URL is for dynamic content, so next part is how to route it to correct server.?

It will now read value of Name attribute for UriGroup which is default_host_cluster1_URIs, and name of cluster “cluster1″. It will use these values find out virtual host and the cluster.

It can see the test_cluster has two servers  Server1_Node01_test_server_member1  and   Server1_Node01_test_server_member2 . From the cluster definition it can locate http and https port to forward request to either of the server. The cluster definition also says that the Load balancing algorithm is Round robin.

Sample complete Plugin-cfg.xml

<Config ASDisableNagle=”false” AcceptAllContent=”false” AppServerPortPreference=”HostHeader” ChunkedResponse=”false” FIPSEnable=”false” IISDisableNagle=”false” IISPluginPriority=”High” IgnoreDNSFailures=”false” RefreshInterval=”60″ ResponseChunkSize=”64″ VHostMatchingCompat=”false”>
<Log LogLevel=”debug” Name=”/opt/IBM/HTTPServer/Plugins/logs/ihs-prpc/http_plugin.log”/>
<Property Name=”ESIEnable” Value=”true”/>
<Property Name=”ESIMaxCacheSize” Value=”1024″/>
<Property Name=”ESIInvalidationMonitor” Value=”false”/>
<Property Name=”ESIEnableToPassCookies” Value=”false”/>
<VirtualHostGroup Name=”default_host”>
<VirtualHost Name=”*:9080″/>
<VirtualHost Name=”*:80″/>
<VirtualHost Name=”*:9443″/>
<VirtualHost Name=”*:5060″/>
<VirtualHost Name=”*:5061″/>
<VirtualHost Name=”*:443″/>
<VirtualHost Name=”*:9081″/>
<VirtualHost Name=”*:9444″/>
<ServerCluster CloneSeparatorChange=”false” GetDWLMTable=”false” IgnoreAffinityRequests=”true” LoadBalance=”Round Robin” Name=”test_cluster” PostBufferSize=”64″ PostSizeLimit=”-1″ RemoveSpecialHeaders=”true” RetryInterval=”60″>
<Server CloneID=”1411a9de8″ ConnectTimeout=”0″ ExtendedHandshake=”false” LoadBalanceWeight=”2″ MaxConnections=”-1″ Name=”Server1_Node01_test_server_member1″ ServerIOTimeout=”0″ WaitForContinue=”false”>
<Transport Hostname=”″ Port=”9080″ Protocol=”http”/>
<Transport Hostname=”″ Port=”9443″ Protocol=”https”>
<Property Name=”keyring” Value=”/opt/IBM/WebSphere/Plugins/config/ihs-prpc/plugin-key.kdb”/>
<Property Name=”stashfile” Value=”/opt/IBM/WebSphere/Plugins/config/ihs-prpc/plugin-key.sth”/>
<Server CloneID=”1411a9dt5″ ConnectTimeout=”0″ ExtendedHandshake=”false” LoadBalanceWeight=”2″ MaxConnections=”-1″ Name=”Server1_Node01_test_server_member2″ ServerIOTimeout=”0″ WaitForContinue=”false”>
<Transport Hostname=”″ Port=”9081″ Protocol=”http”/>
<Transport Hostname=”″ Port=”9444″ Protocol=”https”>
<Property Name=”keyring” Value=”/opt/IBM/WebSphere/Plugins/config/ihs-prpc/plugin-key.kdb”/>
<Property Name=”stashfile” Value=”/opt/IBM/WebSphere/Plugins/config/ihs-prpc/plugin-key.sth”/>
<Server Name=”Server1_Node01_test_server_member1″/>
<Server Name=”Server1_Node01_test_server_member2″/>
<UriGroup Name=”default_host_test_cluster_URIs”>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/prdbutil/*”/>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/prweb/*”/>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/prhelp/*”/>
<Uri AffinityCookie=”JSESSIONID” AffinityURLIdentifier=”jsessionid” Name=”/prsysmgmt/*”/>
<Route ServerCluster=”test_cluster” UriGroup=”default_host_test_cluster_URIs” VirtualHostGroup=”default_host”/>
<RequestMetrics armEnabled=”false” loggingEnabled=”false” rmEnabled=”false” traceLevel=”HOPS”>
<filters enable=”false” type=”URI”>
<filterValues enable=”false” value=”/snoop”/>
<filterValues enable=”false” value=”/hitcount”/>
<filters enable=”false” type=”SOURCE_IP”>
<filterValues enable=”false” value=”″/>
<filterValues enable=”false” value=”″/>
<filters enable=”false” type=”JMS”>         <filterValues enable=”false” value=”destination=aaa”/>
<filters enable=”false” type=”WEB_SERVICES”>
<filterValues enable=”false” value=”wsdlPort=aaa:op=bbb:nameSpace=ccc”/>

Leave a Reply

You must be logged in to post a comment.

2 Responses to “ Websphere Routing a Request using Plugin-cfg.xml ”

  1. Que: I have IBM http server with a N node clustered websphere 6.1 environment. I have set deployment manager(dmgr) to propagate changes at plugin-cfg.xml automatically. Now the issue with that is, I often see some unwanted update timestamps at this file and difficult to make out when was the last genuine change was made.

    I wish to switch off auto-update but need to know when plug-in file should be updated/propagated?

    Ans :Scenarios
    1. An application is deployed to an Application Server
    2. An application is uninstalled
    3. A virtual host definition is updated /saved
    4. Log Level changes
    5. Security updates like keyring,stashfile
    6. Config Changes like adding/removing clustermembers, appservers, webservers etc
    7. Balancing mode
    8. Server request ports

  2. Good Article

Top of Page

Top menu