Setting up dynamic routing for multiple Liberty collectives
You can configure the Dynamic Routing feature to route application requests to all application instances when the application is deployed in multiple collectives.
Before you begin
Complete the product installation steps in Setting up dynamic routing for Liberty collectives.
About this task
Intelligent Management for web servers enables routing of HTTP requests to members of Liberty collectives without requiring an administrator to regenerate the WebSphere® plug-in configuration file when the environment changes. When servers, cluster members, applications, or virtual hosts are added, removed, started, stopped, or modified; the new information is dynamically delivered to the WebSphere plug-in. Requests are routed based on up-to-date information.
Intelligent Management for web servers routes application requests to all application instances when the application is deployed in multiple collectives. Previously, when requests were routed to multiple collectives, a particular application was not allowed to be installed in more than one collective.
To use Intelligent Management for web servers to route HTTP requests to Liberty collectives, enable the
dynamicRouting-1.0
feature in all collective controllers of the collectives. The
dynamicRouting-1.0
feature provides a Dynamic Routing service that delivers routing
information to Intelligent Management for web servers. Use the setup,
genPluginCfg, and genKeystore command actions to generate the
keystores that are needed for secure communication between the plug-in and the Dynamic Routing
service, and a plug-in configuration file that enables Intelligent Management for web servers in the
WebSphere plug-in.
- Use the
connectorClusterName
attribute of the<dynamicRouting>
XML element in the server.xml of the collective controllers. All controllers in the same collective must use the same value for theconnectorClusterName
attribute. Controllers in different collectives must use different values for theconnectorClusterName
attribute. If theconnectorClusterName
attribute is specified, the value overrides the value that is specified with the-collectiveName
option used when the collective was created. - Use the
--collectiveName
option when the collective is created with thecollective create
command.
Dynamic Routing controllers in each collective inform the WebSphere plug-in about the state of the collective so the plug-in can dynamically route requests for the same application across multiple collectives. The Dynamic Routing controllers inform the WebSphere plug-in about each application that is available in the controller's collective. Thus, the WebSphere plug-in is aware when an application is available in more than one collective. Unless a rule states otherwise, all requests to an application are balanced across all appropriate servers.
The routing rules capability enables incoming requests to the WebSphere plug-in to be routed to a specified set of servers. Additionally, requests can selectively be rejected or redirected. Selection of whether a rule applies to an incoming request is done through matching of attributes of the incoming request.
Procedure
Results
With the dynamicRouting-1.0
feature enabled, Intelligent Management can now
dynamically route HTTP requests to Liberty
collectives.