![]() | ||||||||||||||||||
dynamic servers
Resin includes the ability to add servers to clusters dynamically. These dynamic servers are able to use distributed sessions and the distributed object cache. The triad also updates these servers with applications that are deployed via the remote deployment server. The Resin load balancer is also able to dispatch requests to them as with any static server. Adding a dynamic server to a cluster is a simple two-step process:
Before adding a dynamic server, you must:
Check the main Clustering section for more information on this topic. For the first step of registration, you can use a JMX tool like jconsole or simply use the Resin administration web console. We'll show how to do the latter method here. For registration, you'll specify three values:
With these three values, browse to the Resin administration application's "cluster" tab. If you have enabled dynamic servers for your cluster, you should see a form allowing you to register the server in the "Cluster Overview" table. ![]() Once you have entered the values and added the server, it should show up in the table as a dead server because we haven't started it yet. The dynamic server's registration will be propagated to all the servers in the cluster. ![]() Now that we've registered the dynamic server, we can start it and have it join the cluster. In order for the new server to be recognized and accepted by the triad, it needs to start with the same resin.xml that the triad is using, the name of the cluster it is joining, and the values entered in the registration step. These can all be specified on the command line when starting the server:
dynamic-server> java -jar $RESIN_HOME/lib/resin.jar -conf /etc/resin/resin.xml \
-dynamic-server app-tier:123.45.67.89:6800 start
Specifying the configuration file allows the new server to configure itself using the <server-default> options, to find the triad servers of the cluster it is joining, and to authenticate using the administration logins. This command starts the server, which immediately contacts the triad to join the cluster. Once it has successfully joined, the "Cluster" tab of the administration application should look like this: ![]()
| ||||||||||||||||||