Overview
This article briefly introduces the various components and support types offered by these components in a cluster, as well as the server environment supported by component deployment.
You should first confirm which components need to be installed, and then prepare the server according to the number of each component.
Cluster Component Requirements
Server Node
Cluster nodes are the core of FineReport cluster. It is an independent server responsible for handling user requests, generating reports, and managing other components. Cluster nodes communicate and collaborate through a series of network protocols and services.
You should prepare a different number of server nodes according to the concurrency level.
Note: Only one node of the cluster can be deployed on a server, and it is not supported to deploy multiple server nodes of the cluster on one server.
Concurrency Level | Number of Nodes | Memory Configuration per Node |
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 |
Load Balancer
In FineReport cluster architecture, the load balancer is a component that connects users and cluster nodes to ensure that user requests are properly distributed to different cluster nodes.
Through various algorithms, load balancers can distribute user requests to different nodes for better performance and load balancing effects.
Types of load balancers supported by FineReport are shown in the table below:
Note: Apache is not supported.
Load Balancer | Introduction |
Nginx | Nginx is a high-performance, high-reliability, open-source web server and reverse proxy server. It is widely used in load balancing, web caching, and security control, etc. Advantages: With high performance and high concurrency processing capabilities, it supports multiple reverse proxy and load balancing algorithms, and is easy to configure and scale. It has good concurrency performance and minimal memory usage on Linux system, with its stability and performance being fully verified. Disadvantages: The integration between different modules is not complete enough, which may be difficult for beginners to learn and use. On Windows systems, if the concurrency requirement exceeds 200, concurrency issues may occur. |
Traefik | Traefik is a modern, dynamic load balancing tool mainly used on Windows systems. Advantages: It does not need to be installed and can be executed in the command line, with simple deployment and usage. It supports automatic update of reverse proxy and load balancing configuration. It has good performance on Windows systems. Disadvantages: Some features require the advanced version, while the upgraded version is not stable enough. |
AWS ELB | AWS ELB is a load balancing service provided by Amazon Web Services, including Classic Load Balancer, Application Load Balancer, and Network Load Balancer. It can achieve load balancing of different protocols. Advantages: With usability and reliability, it supports for multiple protocols, and can be deployed quickly and maintained conveniently. Disadvantages: high costs, complicated configuration and permission management |
F5 | F5 is a network application service company that offers products including load balancing, application security, etc. Advantages: With high availability and reliability, it supports for multiple application scenarios and types, and provides advanced application security solutions. Disadvantages: It is relatively expensive and requires some technical support because of the complicated configuration. |
External Database
Except for platform attribute configuration, all information in the decision-making platform, including directory tree settings, template scheduling information, etc., is stored in a single database.
It manages and stores various configuration information of cluster nodes to ensure the consistency of configurations among nodes and facilitate admins to centrally manage cluster metadata.
Types | Versions Supported | Configuration Approach |
RDS MySQL | / | |
MySQL | 5.1.73、5.5.31、5.5.46、5.5.56、5.6.22、5.6.31、5.7.16 | |
8.0.11、8.0.16、8.0.20 | ||
Oracle | 10g, 11g, 12c | |
SQL Server | 2000、2005、2008、2012、2014、2016 | |
2017 | ||
DB2 | 9.7、8.2、11.1 | |
PostgreSQL | 9.4.7、9.5.0、9.5.2、9.6.0 |
State Server
The state server is a service component used to store the status information of cluster nodes, such as the running status, load, task processing of each node.
It can help dynamically allocate tasks to appropriate nodes, and assist admins in real-time monitoring and scheduling of cluster status.
The supported state server solutions in the FineReport cluster include: Redis Standalone, Redis Cluster, Redis Sentinel, Tencent Cloud Redis Cluster 4.0.
File Server
The file server is a component in the cluster that stores report data and attachments. It can centrally manage and share files between cluster nodes, ensuring consistency and high availability of file data.
Since each node reads resource files from the same file server without synchronization, the resource files read by each node will always remain consistent.
FineReport supports multiple file servers, and the advantages and disadvantages of each type will be explained below.
Server Configuration Requirements
Number of Servers
Note: It is recommended to deploy Nginx, Redis, and FTP on separate servers if possible.
1. Two-node cluster
Application Server 1 | Web containers (Tomcat, WebLogic, WAS) |
Application Server 2 | Web containers (Tomcat, WebLogic, WAS) |
Component server 3 | Load balancer (Nginx) |
Status server (Redis) | |
File server (FTP) |
2. Three-node cluster
Application Server 1 | Web containers (Tomcat, WebLogic, WAS) |
Application Server 2 | Web containers (Tomcat, WebLogic, WAS) |
Application Server 3 | Web containers (Tomcat, WebLogic, WAS) |
Component Server 4 | Load balancer (Nginx) |
Status server (Redis) | |
File server (FTP) |
Operating System
FineReport cluster solution supports both Windows and Linux systems. The supported operating system versions are shown in the following table:
Category | Operating System | Verified Versions |
Linux | CentOS 6 | CentOS 6.5, CentOS 6.6, CentOS 6.7, CentOS 6.8, CentOS 6.9 |
CentOS 7 | CentOS 7.0, CentOS 7.1, CentOS 7.2, CentOS 7.3, CentOS 7.4 CentOS 7.6, CentOS 7.8, CentOS 7.9 | |
RedHat 6 | RedHat 6.5, RedHat 6.6, RedHat 6.7, RedHat 6.8, RedHat 6.9 | |
RedHat 7 | RedHat 7.0, RedHat 7.1, RedHat 7.2, RedHat 7.3, RedHat 7.4 RedHat 7.7 | |
Ubuntu | Ubuntu 10.04.4, Ubuntu 18.04, Ubuntu 20 | |
Amazon Linux | Amazon Linux AMI release 2018.03 | |
Windows | Windows Server | Windows Server 2008, Windows Server 2012, Windows Server 2016 |
Memory Configuration
Server | System Memory | Allocated JVM Memory of the Web Container |
Application server | 16 GB or higher is recommended. | Between 8 GB and 32 GB is recommended. If it is too large, FullGC time of the system will be too long. |
Component server | 8 GB or higher is recommended. | / |
Disk Space
Deploying cluster server requires at least 40 GB of free available space in the root directory of each machine. If the template resource file is too large, you can choose a server with larger disk space according to the actual situation.
Machine | Function | Hardware | Configurations | Introduction |
Application server 1 | Deployment | / (root directory) | Ensure at least 40 GB space is available. | System temporary cache directory |
Application server 2 | /usr | Ensure at least 15 GB available space to deploy the project. | Default log storage path | |
Component server 3 | Deploy cluster components | / (root directory) | Ensure at least 40 GB space is available. | The address of temporary cache during the system operation |
/usr | Ensure at least 15 GB space is available | Install various components of the cluster and store log files. | ||
/home | Ensure at least 10 GB space is available | File server storage directory. You can store template and other resource files under it. |
Network Requirements
1. Clusters can be deployed in both public and private network environments, and good communication environments among servers are required.
Types | Bandwidth | Subnet | Note |
Public network | Above 10 Mbps | Same network segment | / |
Intranet | No requirements | Same network segment | Intranet generally has 100Mbps or 1Gbps bandwidth, so there is no requirement for bandwidth. |
2. You need to confirm that the communication between the servers and the external databases is normal:
For Linux users, you can use cluster environment detection tools to automatically detect system environment, or use ping statements for detection.
For Windows users, you can use ping or telnet statements for detection.
Web Container
A web container is a type of service program that can support the deployment of web applications. Each program provides the corresponding service on a server port, and it handles requests sent by clients.
The commonly recommended web containers are Tomcat, WebLogic, and WebSphere containers.
JDK
The JDK version needs to be 1.8 and the minor version needs to be above JDK8u102.
Components Requirements for Deploying Clusters
ROOT Permission
When you install FTP on a Linux system, the highest user (root) is required, otherwise the installation will fail. If you do not need to install FTP, this requirement can be ignored.
GCC Compiler
Redis and Nginx both rely on GCC compiler for deployment on Linux systems. If you choose a Linux server, make sure the system has GCC compilation environment.
Query command: gcc -v. If there is no gcc environment, you need to install it by yourself. The command for online installation is: yum install gcc gcc-c++.
Port Requirements
Classification | Content | Ports | Note |
Load balancer | Nginx | 80 or 443 | External port. It must be open to the outside and can be modified through nginx.conf. It is the entrance port of the cluster system. You can configure other load balancing ports by yourself. |
Web container | Tomcat | 8080 | External ports. They can be closed to the outside and modified by server.xml. SSL, short addresses, and other configurations can be set at the load balancing. |
WebLogic | 7001 | ||
WebSphere | 9080 | ||
Message notification | WebSocket port | 38888/39888 | / |
WebSocket forwarding port | 38889 | ||
File server | FTP | 20、21 | Internal ports. They can be modified by yourself. |
SFTP | 22 | Internal port. It cannot be modified. | |
HDFS | 9000 | Internal ports. They can be modified by yourself. | |
State server | Redis standalone | 7379 | Internal port. It can be modified by redis.conf. |
Redis cluster | / | Internal port. You can modify redis.conf according to the configuration by yourself. |
Note:
1. Web containers, file servers, and state servers contain multiple types. You can open the corresponding ports according to the actual situation.
2. If the default port conflicts with other servers, you need to modify the port first and then open the corresponding port.
3. Open port 21 and any port greater than 1024, then enable FTP passive mode.
4. For Docker containers or environments with strict port restrictions between servers, you need to open ports between the servers of the nodes for communication.
If you select TCP, you need to open eights ports: 7800/7810/7820/7830/7840/7850/7860/7870.
If you select UDP, you need to open random ports between 45588 and 65536.
Other Requirements for Cluster Configuration
Caching Mode
Caching mode was added. You can select it in the front-end. Using caching mode in conjunction with a file server can improve the high availability of the file server. The introduction is as follows.
1. Types
Cached resource files: including report files, dashboard files, configuration files, map data and so on. Currently, there are four folders: reportlets/, resources/, assets/, dashboards.
Active caching: When the project is started, all resource files will be cached, and subsequent use is basically the same as passive caching.
Passive caching: Only cache the accessed resource files.
2. Functions
Advantages:
Improve the high availability of the file server. When the file server crashes, the system can still read resource files from the cache for providing services normally if you enable caching when using the file sever.
Caching avoids frequent file reading and writing, resulting in faster speed,and significantly improves template access performance.
Disadvantages:
Cache will occupy system memory and hard disk resources.
Due to unstable situations such as cluster splitting, caching may occasionally be out of sync. At this time, you can manually refresh the cache to synchronize it.
In conclusion, enabling caching can significantly improve the performance of the server. When used in conjunction with a file server, it can improve the high availability of the system. It is recommended to consider enabling caching when using a file server.
Communication Protocol
FineReport cluster supports two communication protocols, TCP and UDP. Currently, TCP is the default choice. Below are the differences between the two protocols:
TCP | UDP | |
Connection | Based on connection | No connection |
Requirements for system resources | More | Fewer |
Program structure | Complicated | Simple |
Data accuracy | guaranteed | Not sure |
Data sequence | guaranteed | Not sure |
Application Scenario | / | Heavy network burden, high demand for response speed |
Socket | socket(PF_INET,SOCK_STREAM,0) | socket(PF_INET,SOCK_DGRAM,0) |
Data transmission | send/recv | sendto/recvfrom |
Confirmation of address information | Confirm during connect/accept | Address information needs to be specified every time in the sendto/recvfrom function. |
It should be noted that most cloud servers (such as Alibaba Cloud and Amazon Cloud) do not support UDP, so TCP is the only choice.
If the server supports both TCP and UDP, when there are a few nodes, the difference between choosing TCP and UDP is not significant. When there are multiple nodes, it is recommended to select UDP for higher communication efficiency.