MENU

CAMServer Redundancy and load balancing

TOC

Redundancy and load balancing

CAMServer With the Ultimate plan,Very easy in on-premise environmentWeb and video servers can be made redundant and load-balanced. This allows services to continue even if one server goes down, and even if a large number of users use it, processing can be distributed and services can be provided without degrading performance.

In addition, the distributed configuration CAMServer But real-time communication is possible. For example,CAMServer1 The Client is connected to theCAMServer2 Chat and web conferencing are possible with another Client connected to the

- Web conferencing load balancing is based on the number of active conferences and the number of participating users.
・The number of simultaneous web conferences is simplyCAMServerThis 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 making it a standby system). Web conferences can always be load balanced.
  • availability: DB connection settings when a failure occurs on Unit 1 cam.serverDatePath 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 DB/File on a highly durable external Storage NAS with a RAID configuration and refer to both CAMServer1 and CAMServer2. Or specify a virtual NAS provided by the virtualization platform host OS.
  • 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.
  • availabilityWhen a failure occurs,Web App Version If you use cam.clusterHostsDetects and enables automatic failover.
  • costRelatively inexpensive configuration.

Redundant external storage configuration

  1. Storage: A configuration that uses redundant file sharing servers (Windows Server Failover Clustering + SAN, AWS S3 + rclone, etc.) and emphasizes high availability against disk failure.
  2. 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.
  3. load distribution: Same as small start configuration.
  4. 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.
  5. 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 configuration requirements detailsPlease also check:
  • 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

Configuration Overview

To make the CAMServer redundant and load-balanced, install a CAMServer on each of the distributed servers,CAMServer/boot.ini Add the following entry to the file

cam.clusterHosts=camserver1;camserver2
cam.clusterHostsDesc=camserver1 がメインサーバ、camserver2 は待機系サーバです。
cam.serverDatePath=\\disk\CAMServer\data
cam.disableLANNetwork=true

# ビデオサーバの分散設定。「サーバ=ノード分散参加数目安値」で定義。
cam.videoDomains=camserver1=50;camserver2=50;camserver3=50

cam.clusterHosts

cam.clusterHosts is the host name (FQDN) of each distributed server. ; Separate and list them.

To start CAMServer on port 443:

cam.clusterHosts=camserver1;camserver2 

If you separate CAMServers for each department, write the local host name (FQDN) at the beginning of the ini file of each CAMServer. The enumeration order affects the initial connection server and video server selection at startup.Web App Version This allows for a failover connection in the event of a failure.

To start CAMServer on port 8080:

cam.clusterHosts=camserver1:8080;camserver2:8080 

You can deploy an L7 load balancer in front of CAMServer and have CAMServer forward to port 8080, but the settings in that case are as above. In this case, failover is the responsibility of the load balancer, so camapp will not fail over. This is cam.serverURLDomain, ,cam.clusterHosts Compare domains and detect and control whether they have load balancers.

cam.clusterHostsDesc

cam.clusterHostsDesc can change the comments in the description field of the distributed server.

cam.serverDatePath

cam.serverDatePath Specify the location to save the DB and uploaded attachments. Specify a shared disk that can be accessed from distributed servers.

*When specifying a shared disk and running a service OS user running the Windows serviceMust be specified
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.videoDomains

Video server distribution settings. If you define it as follows, when the total number of participants in the rooms in the enumerated order exceeds 50, the conference room will be created on the next server.

cam.videoDomains=camserver1=50;camserver2=50;camserver3=50

・Can be omitted if cam.clusterHosts is set
- This value does not indicate the maximum number of connections, but is merely a guideline for load balancing.

cam.disableLANNetwork

TCP/UDP connections for LAN are not required in a redundant configuration, so please disable them.

cam.disableLANNetwork=true

Firewall communication permission for data synchronization between servers

  1. Real-time data updates (user presence status, messages, chat rooms, etc.) are synchronized between CAMServers, so communication between servers must be permitted via a firewall, etc.
  2. TCP ports 9090, 9091, and 9092 for access to the DB master node
  3. TCP 8080 port for server-to-server connection URL
    • Defined in the ini file cam.clusterHosts
    • Example) cam.clusterHosts=camserver1:8080;camserver2:8080;camserver3:8080

Load Balancer detailed requirements

We will describe the detailed requirements for Load Balancer configuration.

L7/L4 is supported, but session affinity is required. Please note that L7 can fix connections on a session basis, but L4 can only fix connections by IP. This section explains the configuration for L7.

1. SSL Termination

  1. Install an SSL certificate on the load balancer and perform SSL/TLS decryption.
  2. Communications from clients are accepted via HTTPS, and HTTP is used from the load balancer to the backend.

2. Load Balancing Algorithm

  1. Round Robin Load Balancing
  2. Cookie-based session maintenance (session affinity) is required, and it is necessary to check whether the system has the function to distribute access from the same client to the same node.

3. Headers and additional processing forwarded to the backend server (8080)

X-Forwarded-Proto
Header item that identifies the request as https when LB forwards it to the backend server

X-Forwarded-For
Header item that identifies the client's IP address when LB forwards it to the backend server

Handling WebSocket Upgrade headers
Analyze the HTTP request and, if an Upgrade header is detected, trigger a switch to TCP.

Today's load balancers (AWS/GCP/Azure) have standard default settings.

4. Communication with the backend server

Communication from the load balancer to each CAMServer is done using the following protocols and ports.

  • Protocol: HTTP
  • Port number: 8080
  • Connection example: http://HOSTNAME:8080/

5. Health Check

  1. The load balancer periodically requests the next URL and determines it to be "normal" if the conditions are met.
  2. Health Check URL: http://HOSTNAME:8080/CAMServer/healthCheck
  3. Health check condition: HTTP status code: 200 Response body: {“status”:200}
TOC