Successfully!

Error!

Cluster Solutions Selection

  • Last update:  2023-05-04
  • Overview

    A brief overview of the FineReport cluster architecture is load balancing, state server, file server/node synchronization, and external database. The architecture is clear, but application components in the architecture need selecting and matching according to different scenarios.

    This article will introduce how to choose a cluster solution, providing some effective guidance for IT personnel to plan and design cluster solutions.

    Cluster Solutions

    Cluster Architecture

    Environment

    Application Architecture

    Container

    External Database

    Load Balancing

    Status Server

    File Server

    Linux

    Windows

    Servlet

    Tomcat

    WebLogic

    WebSphere

    MySQL

    SQL Server

    Oracle

    DB2

    1. Software load   balancing:

    • Nginx+ (keepalived)

    • Traefik

    • AWS ELB

    2. Hardware load   balancing: F5

    Redis+   (cluster/standalone)

    FTP

    SFTP

    HDFS

    S3/OSS/OBS

    Share external   directories:

    • NFS

    • NAS

    • External disks

    You need to notice the following points:

    It is not recommended to use Nginx 1.14.1 and its previous versions. It is recommended to use Nginx-1.15.6.

    It is not recommended to install and use Nginx on Windows, and it is recommended to install and use Traefik on Windows. For more details, see Introduction to Cluster Solution.

    There is an issue of Chinese garbled characters in NFS solution on Windows. It is recommended to use Linux for deployment.

    Cluster Configuration Recommendations

    Category

    Ordinary Solution

    High Availability Solution

    Introduction

    External database

    Standalone   database

    Primary-Backup   mode

    Configurations   such as max_connections and pool_size in the database can easily affect   concurrency limits and can be optimized.

    Load balancing

    Nginx   (recommended)

    Nginx+keepalived

    Each Nginx   application requires only 1 GB of memory (normally only 15 MB is required for   50,000 concurrent connections), and there are no storage space requirements.

    Status server

    Redis standalone

    Redis cluster

    Each Redis   application only requires 4 GB of memory.

    File server

    FTP/SFTP

    HDFS/NAS/OSS

    File servers can   easily affect concurrency performance and can be optimized.

    For example, in   FTP, frequently reading and writing templates by multiple nodes can lead to   blocking and lagging, which can be resolved through configuration or improved   disk performance.

    Node

    Concurrency: The   number of users who send edit/view requests to the server at the same time.   For specific node configurations, refer to the table below.

    1. JVM memory   does not exceed 32 GB.

    2. It is   recommended that the node memory should be at least 1.25 times the JVM   memory.

    The specific configuration of the node is shown in the table below:

    Concurrency

    Number of Nodes

    Node Memory Configuration

    0~100

    1

    JVM-8G

    100~200

    1

    JVM-12G

    200~300

    1

    JVM-16G

    300~400

    2

    JVM-12G

    400~500

    2

    JVM-16G

    500~900

    3

    JVM-16G

    900~1200

    4

    JVM-32G

    Typical Cluster Structure Recommendations

    1. Two-Node Cluster (Entry-Level High Availability)

    Environment

    Linux

    CentOS 7

    Application   Architecture

    Servlet

    /

    Container

    Tomcat

    Tomcat 8

    External Database   (Configuration Database)

    MySQL   (standalone)

    MySQL 5

    Load Balancing

    Nginx   (standalone)

    Nginx-1.15.6

    Status server

    Redis   (standalone)

    Redis 5/6

    File   Synchronization Method

    SFTP

    Configuring the   SSH service

    2. Three-Node Cluster (Standard High Availability)

    Environment

    Linux

    CentOS 7

    Application   Architecture

    Servlet

    /

    Container

    Tomcat

    Tomcat 8

    External Database   (Configuration Database)

    Oracle (cluster)

    Oracle 11g RAC

    Load Balancing

    Nginx (hot   standby)

    Nginx +   Keepalived

    Status Server

    Redis (cluster)

    Redis 5/6 (three   masters and three slaves)

    File   Synchronization Method

    HDFS

    Hadoop 3.0

    3. Windows Clusters

    Environment

    Windows

    Windows Server   2008

    Application   Architecture

    Servlet

    /

    Container

    WebLogic

    WebLogic   12.2.1.3.0

    External Database   (Configuration Database)

    SQL Server   (Standalone)

    SQL Server 2008

    Load Balancing

    Traefik   (standalone)

    Traefik 2.0

    Status Server

    Redis   (standalone)

    Redis 5/6

    File   Synchronization Method

    FTP

    Configuring IIS   WEB service

    4. Other Instructions

    In addition, it also supports K8S cluster for application orchestration and auto-scaling.

    In cloud environments, higher availability is achieved in cluster environments through cloud provider's technologies such as AWS ELB, Alibaba Cloud OSS, and Tencent Cloud Redis.

    Note: If you are interested in these two solutions, send an email to international@fanruan.com or click 联系方式按钮.png at https://www.finereport.com/en/.

    Deployment and Operation

    The process is shown below:

    集群方案3.jpg

    Requesting Resources

    Each component needs to request resources.

    For a standard high-availability cluster, each component needs to be deployed on separate servers, with physical isolation to prevent interference between components.

    Servers:

    1. Project servers (two or more)

    2. Server where the external database is located

    3. Server where the load balancer is located

    4. Status server

    5. File server

    Note: The number and configuration of each server are related to the business. It requires professional performance testing by FineReport, combined with network environment, file read/write efficiency, database concurrency performance and other factors, to determine the concurrency level that can be supported, and thus provide reasonable suggestions.

    Firewall: The network among all nodes must be accessible.

    Port: refer to Cluster Environment Preparation

    Starting Deployment

    1. Use cluster environment detection tool to check if the system environment meets the requirements for cluster deployment.

    2. Each server needs to install the required components, which can be done using automated deployment tools (only applicable to Linux systems).

    3. Run FineReport server and configure all components on the configuration page.

    4. In the cluster configuration page, you can configure Redis storage key prefix, and after setting this parameter, it will not conflict with the keys of other servers.

    5. Restart the server. If the number of nodes is normal and there are no error messages, it means that the cluster deployment is successful.

    Note: After configuration, you can install a system availability monitoring tool. When the cluster is suddenly unavailable, you will receive an immediate notification.

    Cluster Usage Recommendations

    When modifying templates, try to switch to the remote directory for operation. If it is necessary to manually modify the template file, you need to manually refresh the cache.

    Attachment List


    Theme: Deployment and Integration
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback