Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

To set up BellaDati in cluster mode using Tomcat containers is a bit different compared to doing it in Glassfish (documented at Scaling BellaDati).

Set up

Even though Tomcat supports running in a cluster mode, we can't do it with BellaDati as it requires HTTP session objects to be serialisable which is currently not possible. Because of that the BD cluster must be set up as following:

  1. Install Tomcat on each node which should be part of the BD cluster - see Installing BellaDati on Tomcat.
  2. For each Tomcat instance add following JVM properties to either CATALINA_OPTS or to JAVA_OPTS environment variables (see point 4.4 on the Installing BellaDati on Tomcat page):

    Code Block
    -Dapplication.actor.server.port=<port> -Dtapestry.clustered-sessions=true -Dapplication.servers=<servers-list>

    where:

    • <port> - is the port to be used by servers for in-cluster communication, e.g. 2335 and
    • <servers-list> - is the comma separated list of <host>:<port> addresses of each node in the cluster, e.g. 172.31.38.23:2335,172.31.13.180:2335,172.31.45.195:2335,172.31.2.41:2335.
  3. Deploy the BellaDati WAR file to each of the servers and start each of the Tomcat servers - see below.
  4. Set up the load balancer and point it to each of the nodes in the BD cluster.

It may be neccessary to add another JVM property to direct Akka to run under remote IP address of the host and not local (127.0.0.1), otherwise nodes wouldn't be able to talk to each other. The JVM property is -Dapplication.actor.server.host=<remote IP of the host>

BellaDati (re-)deployment

As each server in the BD cluster is running as a separate Tomcat installation, the (re-)deployment of BellaDati can't be done from a single central place as it is in case of Glassfish set up (see Scaling BellaDati). 

To (re-)deploy a new version of BellaDati:

  1. Stop a single Tomcat server.
  2. Deploy a new version of BellaDati by copying the WAR file to a path specified in Tomcat's BD context file (see point 4.1 on the Installing BellaDati on Tomcat page).
  3. Start the Tomcat server.
  4. Repeat steps 1-3 on all the nodes in the cluster.




Sv translation
languageja

Tomcat上でBellaDatiをクラスターモードで利用するためにはGlassfishとは異なる方法で行います(Glassfish上での設定方法はBELLADATIのスケーリングを参照)。

セットアップ

Tomcatはクラスターモードをサポートするものの、BellaDatiはHTTPセッションオブジェクトのシリアル化を要するためこれを利用することができません。そのため、BellaDatiのクラスタ化は次の手順を行います:

  1. TomcatをBDクラスターを構成する各ノードにインストールします。- TOMCAT上でBELLADATIのインストールを参照。
  2. 各Tomcatインスタンスに次のJVMパラメーターをCATALINA_OPTSまたはJAVA_OPTS環境変数に設定します。(TOMCAT上でBELLADATIのインストール4.4節を参照):

    Code Block
    -Dapplication.actor.server.port=<port> -Dtapestry.clustered-sessions=true -Dapplication.servers=<servers-list>

    変数は次の通りです:

    • <port>- クラスター同士が通信するポート番号です。例. 2335
    • <servers-list>- カンマで区切られた<host>:<port>の形式に従う各ノードのアドレスです。 例. 172.31.38.23:2335,172.31.13.180:2335,172.31.45.195:2335,172.31.2.41:2335
  3. BellaDati WARファイルを各ノードにデプロイし、Tomcatを起動します。- デプロイの詳細は下記参照。
  4. ロードバランサ―がBDクラスターの各ノードに指すよう設定します。

ノード同士が通信しない場合、ローカル(127.0.0.1)ではなくホストのリモートIPアドレスでAkkaを動作させるために、JVMパラメーターに次の値を設定する必要がある場合がございます。

Code Block
-Dapplication.actor.server.host=<remote IP of the host>

BellaDati (再)デプロイ手順

各BDクラスタは独立したTomcatのインスタンスで稼働しているため、BellaDatiの(再)デプロイはGlassfishと異なり一括で行うことができません。(BELLADATIのスケーリングを参照). 

新しいバージョンのBellaDatiを(再)デプロイするためには次の手順を行います。:

  1. 1つのTomcatサーバーを停止する。
  2. 新しいバージョンのBellaDati WARファイルをTomcatのBDコンテキストファイルに指定されたパスにコピーする。(TOMCAT上でBELLADATIのインストール4.1節を参照)
  3. Tomcatサーバーを起動する。
  4. 1から3のステップを全てのノードに対して行う。