Introduction to Cluster Solution

  • Author:ayuan0625
  • Recent Updates:ayuan0625 on 2021-01-19
  • I. Introduction

    1) Cluster means that multiple projects are grouped together to achieve the same service. In a cluster, each project can be regarded as one node.

    2) As clusters can be horizontally expanded, users can add nodes to achieve concurrency increase in a linear fashion, thus equipping the system with better performance to support concurrency. Users can also set aside a number of projects as backups to avoid losses caused by system downtime (e.g. business interruption and data/template loss) in case of any single server being unavailable. This is an effective way to keep the system running 24/7.


    3) For more information on cluster settings, please refer to cluster settings.

    You Will Learn
    • Introduction

    • Features

      • High availability

      • High consistency

      • High scalability

      • User-friendly

    • Cluster architect

    • Clustering solution

      • Load balancer

      • Web container 

      • External database

      • Status server

      • File synchronization

      • Cluster communication

    II. Features

    1. High availability

    1) In the hostless mode, if a node fails in a cluster, the cluster system will continue to provide uninterrupted processing;

    2) If a node fails in a cluster, it will automatically switch to another node, without the need of re-login.


    2. High consistency

    1) Configuration information and resource files of platforms in all nodes can be revised and updated in a real-time and synchronized way;

    2) If JAR packages in nodes are inconsistent, they will be automatically checked, compared and alarmed when booting.


    3. High scalability

    As clusters can be horizontally expanded due to its excellent architecture design, users can add nodes to achieve concurrency increase in a linear fashion, thus equipping the system with better performance to support concurrency.


    4. User-friendly

    1) It has simple visual configurations, thus users can operate 80% of settings on the decision-making platform;

    2) It supports hot deployment, thus users can add/delete nodes simply by copying node files without the need of rebooting;

    3) It monitors the running of all nodes in a real-time manner, thus users can be timely reminded of such cases as node downtime and time inconsistency between nodes.

     

    III. Cluster architecture

    IV. Clustering solution

    Web clustering solution consists of “load balancer+web container+status server+file server+ external database”. Below is a brief introduction to the functions of each component:

    1. Load balancer

    By distributing users’ requests reasonably to every node according to the algorithm, the load balancer eases the loading on each individual project and lowers the performance requirements for each single server. The load balancer is the entry-point of server cluster systems.

    Load balancer is generally grouped into software load balancer or hardware load balancer. Nginx is recommended to be used as the software load balancer, and F5 as the hardware load balancer. For load balancer not using Nginx, FineReport only gives you configuration instructions.


    2. Web container (one of the components of J2EE container)

    Web container is a service program, or a software program that supports releasing web programs.

    Every server port is equipped with such a service program to handle requests from the client side.

    Recommended web containers: Tomcat container, WebLogic container, and WebSphere container.x


    3. External database

    External database real-timely synchronizes the information of platform configuration among all nodes in a cluster; all nodes share the same external database.

    Supported databases: MySQL, SQLServe, Oracle, and DB2


    4. Status server

    Status server stores cached data, login information, template lock and sessionid, manages the status and caches of all servers, and restricts accesses and operations by validation.

    Redis Standalone and Redis Cluster are supported at present.


    5. File synchronization

    There are two sync modes you can choose: inter-node sync and file server sharing. Real-time consistency of resource files (template, etc.) will be guaranteed by both modes. 

    1) Inter-node sync: This is the default mode when file server is powered off. In this mode, resource files of all node servers will be read from local project directories; when changes in server templates are saved, relevant data in other nodes will be synchronized in real time.

    2) File server sharing: This mode will work when the file server is powered on. Specifically, by storing templates and other resource files with the file server, resource files of every node will be read from the file server.

    FTP, SFTP and HDFS are viable file servers at present.


    6. Cluster communication

    Before enabling a cluster for use, users can choose one cluster communication protocol, TCP or UDP.  If the server allows multicasting choose UDP, otherwise TCP. The default protocol is TCP.

    Differences between TCP and UDP:


    TCP  

    UDP  

    Connection

    Yes

    No

    Level of system resources

    High

    Low

    Program   structure

    Complex

    Simple

    Data correctness

    Guaranteed

    Not guaranteed

    Data sequence

    Guaranteed

    Not guaranteed

    Application   scenario


    Heavy network load,

    quick response

    Socket

    socket(pf_inet,sock_stream,0)

    socket (pf_inet,sock_dgram,0)

    Data sending and   receiving

    send/recv

    sendto/recvfrom

    Address confirming

    When connect/accept

    To be assigned each time in sendto/recvfrom function

    Attachment List


    Theme: Deployment and Integration
    • Helpful
    • Not helpful
    • Only read