Redundancy and load balancing
In CAMServer's Ultimate plan,Very easy in on-premise environmentWe can provide redundancy and load balancing for web and video servers. This allows services to continue even if one server goes down, and even if there is a large number of users, we can distribute processing and provide services without degrading performance.
Distributed configuration CAMServer
But real-time communication is possible. For example,CAMServer1
The Client is connected to theCAMServer2
You can chat and hold web conferences with other clients connected to the server. Video server load balancing is based on the number of active conferences and the number of participating users.
The number of simultaneous web conferences is simplyCAMServer
This cannot be achieved by simply increasing the number of nodes. It is also necessary to consider the network configuration so that all conferences are not relayed through the same VPN or central router.
Redundancy and load balancing configuration
You can configure the optimal environment according to your company's requirements and costs.
Small start configuration
- Storage:DB/File is placed on CAMServer1 and referenced from CAMServer2. In this case, all users can share data in real time.
- backup: DB/File data needs to be backed up to CAMServer2 daily.
- load distribution: Load balancing is possible by dividing the CAMServer accessed by department (or by using it as a standby system).
- availabilityWhen a failure occurs,Web App Version If you use
cam.clusterHosts
In the case of a disk failure,backupwas doneData up to the previous day is guaranteed. - cost: The cheapest configuration. Start with a single unit and scale up according to the load.
External Storage (NAS) Configuration
- Storage: Place the DB/File on a highly durable external Storage NAS with a RAID configuration and reference both CAMServer1 and CAMServer2.
- backupEven with a RAID configuration, daily backups of DB/File data are necessary to take into consideration power supply/chassis failures and human error.
- load distribution: Same as small start configuration.
- availability: Same as small start configuration.
- costRelatively inexpensive configuration.
Redundant external storage configuration
- Storage: A configuration that uses redundant file sharing servers (Windows Server Failover Clustering + SAN, AWS S3, etc.) and emphasizes high availability against disk failure.
- backup: Data is replicated automatically, so depending on the policy, backups may not be necessary. However, if you are concerned about human error (e.g. manually erasing a disk), backups are still necessary.
- load distribution: Same as small start configuration.
- availability: The web server is the same as the small start configuration. Automatic switching is possible even in the event of a failure due to disk or chassis failure.
- cost:The implementation cost is high. AWS S3 can be built inexpensively, but it is not an option if on-premise is important.
Load Balancer Configuration
- Storage: You can choose between small start configuration, NAS, or SAN.
- backup: Same as small start configuration/NAS/SAN.
- load distribution: Redundancy and load balancing are possible by placing a Load Balancer in front of the CAMServer.note (supplementary information) symbol Load Balancer 構成の要件詳細も確認してください。
- availability: When combined with a redundant external storage configuration, automatic failover is possible in all layers.
- cost: The implementation costs are high.
Redundancy and load balancing settings
Settings common to each distributed server
To make the CAMServer redundant and load-balanced, install a CAMServer on each of the distributed servers,CAMServer/cam.ini
Add the following entry to the file
cam.clusterHosts=camserver1;camserver2
cam.clusterHostsDesc=camserver1 がメインサーバ、camserver2 は待機系サーバです。
cam.serverDatePath=\\disk\CAMServer\data
cam.enabledSingleProcessingHost=camserver1
cam.clusterHosts
cam.clusterHosts
is the hostname of each of the distributed servers. ;
The hostname is delimited and enumerated with Host names are listed from the client side using the https://ホスト名/
The user must be able to access the site via the
cam.clusterHosts=camserver1;camserver2
If you separate CAMServers for different departments, write the host name at the beginning of each CAMServer's ini file. The order of the lists will be affected when selecting the initial connection server and the video server at startup.Web App Version This allows for a failover connection in the event of a failure.
cam.clusterHostsDesc
cam.clusterHostsDesc
can change the comments in the description field of the distributed server.
cam.serverDatePath
cam.serverDatePath
specifies the DB, the location where uploaded attachments are stored. specifies a shared disk, such as a NAS, that can be accessed from distributed servers.
If there is no shared disk, a sub CAMServer can be used as the main CAMServer's CAMServer/config
Storage can also be shared by specifying a folder.
cam.enabledSingleProcessingHost
cam.enabledSingleProcessingHost
should be the hostname of the first server enumerated in cam.clusterHosts. For processes that can only run on a single host, such as batch processing, set this parameter to determine whether the host is defined in cam.enabledSingleProcessingHost before executing the process.
Set only sub servers
cam.disableLANNetwork=true
The second and subsequent sub- CAMServers should be configured to do this.
cam.disableLANNetwork=true
Load Balancer の要件詳細
Load Balancer 構成で必要となる要件詳細を記述致します。
1. SSL終端(SSL Termination)
- ロードバランサーでSSL証明書をインストールし、SSL/TLSの復号を行う。
- クライアントからの通信はHTTPSで受け付け、ロードバランサーからバックエンドにはHTTPを使用。
2. 負荷分散アルゴリズム
- ラウンドロビンでの負荷分散
- クッキー(Cookie)ベースのセッション維持(セッション・アフィニティー)が必要で、同一 Client のアクセスを同一ノードへ振り分ける機能を有しているか確認が必要。
3. バックエンドサーバー(8080)に転送するヘッダや追加処理
X-Forwarded-Proto
LBがバックエンドサーバーに転送する際に、リクエストが https である事を識別させるヘッダ項目
X-Forwarded-For
LBがバックエンドサーバーに転送する際に、クライアントのIPアドレスを識別させるヘッダ項目
WebSocketのUpgradeヘッダーの処理
HTTPリクエストを解析し、Upgrade ヘッダーを検出すると、それをトリガーにTCP切り替え
4. バックエンドサーバとの通信
ロードバランサーから各CAMServerへの通信は以下のプロトコルとポートで行う。
- プロトコル: HTTP
- ポート番号: 8080
- 接続例: http://HOSTNAME:8080/
5. ヘルスチェック(Health Check)
- ロードバランサーは次のURLを定期的にリクエストし、条件を満たす場合に「正常」と判定。
- ヘルスチェックURL: http://HOSTNAME:8080/CAMServer/healthcheck
- ヘルスチェックの条件: HTTPステータスコード: 200レスポンスボディ: {“status”:200}
6. サーバ間データ同期のため、通信許可
- リアルタイムなデータ(ユーザプレゼンス状態、メッセージ、チャットルーム等)更新はCAMServer間で同期を行うためFirewall などでサーバ間の通信許可が必要。
- サーバ間接続URLは、iniファイルの cam.clusterHosts で定義
- 例)cam.clusterHosts=camserver1:8080;camserver2:8080;camserver3:8080
※ camserver1 でユーザ情報が更新された場合、以下URLに接続しデータ同期を行う
http://camserver2:8080/CAMServer/syncWebSocketData
http://camserver3:8080/CAMServer/syncWebSocketData