intra-mart Accel Platform / Setup Guide

Version 12 2014-08-01

«  10. Appendix   ::   Contents   ::   10.2. Double-login Prevention Function  »

10.1. Resin Clustering

10.1.1. Overview

Resin clustering is made up of 3 static servers (Triad Servers) and servers that are manualy added/deleted depending on the load (Dynamic Servers).
By making the cluster configuration, load distribution, propagation of deploy/undeploy, and session failover would be possible.
../../_images/resin_clustering_01.png

10.1.2. Triad Server

Triad servers are the static servers that are always up and operational. They work as a hub in the center of the cluster, and actively audit each other among them.
Because of the triplex redundancy, even while 1 server is under maintenance, remaining 2 servers continue to be operational and secure reliability.
Please edit the resin.properties file in order to set the triad servers. IP addresses of 3 triad servers should be stated in [app_servers].
Similar settings should be stated for all 3 servers.
# app-tier Triad servers: app-0 app-1 app-2
app_servers      : 192.168.100.100 192.168.100.101 192.168.100.102
IDs are automatically assigned in the order IP addresses are stated. ID will have the prefix [app-] and the number starting from 0 shall be assigned.
Following IDs will be allocated in this example.
192.168.100.100   app-0
192.168.100.101   app-1
192.168.100.102   app-2
Please start the triad servers by executing the command from each server. Please specify your own ID for the ID included in the command according to each server.
Shown below is an example of command that is executed from the server with IP address 192.168.100.100.
Change the ID to [app-1] for the server 192.168.100.101, and to [app-2] for the server 192.168.100.102, before executing the command.
  • In case of Windows
    > resin.exe -server app-0 console
    
  • In case of Linux
    > resinctl -server app-0 console
    
This completes the procedures of triad servers.

Note

Triad server is a name meaning triplex redundancy. Only 1 unit or 2 units can serve the purpose,
but since the triad server should always be operational even while 1 unit is under failure or maintenance,
3 units would be operational at maximum. In a system where trial server is not operational, dynamic server cannot participate in the cluster.
If there is no need to have dynamic servers and 2 servers would be enough from the expected system load viewpoint, clustering configuration with only 2 servers would be possible.

10.1.3. Dynamic Server

By utilizing the dynamic servers, you can manually add/delete servers as you like according to the system usage status. If a new dynamic server is added, automatic adjustment of the clustering is made and the server becomes the subject for active audit.
Moreover, distribution of Web applications and the session failover will be automatically provided by the triad server.
resin.properties file should be edited to set up the dynamic servers. Following 3 settings would be required.
  • app_servers
    IP addresses for 3 triad servers are stated.
  • elastic_cloud_enable
    Attributes that are commented out should be enabled, and the value [true] is set.
  • home_cluster
    Cluster ID the dynamic server is added to should be specified. In case resin.xml file has the default setting, please set it to [app].
Shown below is the example of dynamic server being used.
Please make the same setting to both the triad server and dynamic server.
# app-tier Triad servers: app-0 app-1 app-2
app_servers      : 192.168.100.100 192.168.100.101 192.168.100.102

・・・

# Allow elastic nodes to join the cluster (enable for cloud mode)
elastic_cloud_enable : true

・・・

# The cluster that elastic nodes should join - each will contact a Triad server
# Use a separate resin.properties file for each cluster
home_cluster : app
It is recommended that you copy and save the resin.properties file that describes the settings so that the server can be easily duplicated.
Dynamic server should be executed. Please execute the command from the server.
All the triad servers should be started in advance.
  • In case of Windows
    > resin.exe --elastic-server --cluster app console
    
  • In case of Linux
    > resinctl --elastic-server --cluster app console
    
This completes the procedures of using dynamic servers.

10.1.4. Deployment to the Cluster

With regard to the deployment to the cluster, if the deployment is made to one server, Web applications will be replicated and deployed to all the servers.

Users should make the deployment only to the triad server. When the deploy command to the triad server is executed, war files are registered to the internal database of Resin.
war files that are registered will be replicated to other triad servers and dynamic servers, and deployment will be performed at each server automatically.
../../_images/resin_clustering_02.png
  • Deployment Execution
    Please transfer the war files to any one of the triad servers, and execute the command on the server.
    • In case of Windows
      > resin.exe deploy c:\imart.war
      
    • In case of Linux
      > resinctl deploy ./imart.war
      
  • Undeployment Execution
    Please execute the command from the server in a similar way for undeployment too. If you execute the command on any one of the triad servers, undeployment will be performed on all the servers.
    • In case of Windows
      > resin.exe undeploy imart
      
    • In case of Linux
      > resinctl undeploy imart
      
This completes the procedures for deployment.

Note

Deployment or undeployment command can be executed only on the triad servers.
Please execute it on either one of app-0, app-1, or app-2.
This command cannot be executed on dynamic servers.

«  10. Appendix   ::   Contents   ::   10.2. Double-login Prevention Function  »