Creating BI Servers Cluster

Several BI servers of Foresight Analytics Platform can be used to deploy a fault-tolerant cluster. One will require a balancer, state server and several BI servers configured for working with one state server. Links between all cluster elements can be shown as the following schema:

A balancer can be set up both before web servers and BI servers. As a rule, it is enough to set up a balancer before BI server and set up a web application for the balancer address. Sometimes a web application can be a bottleneck, in this case it is necessary to increase the number of web servers and add the balancer before them. Therefore, users will open the address of the balancer, which will direct queries to one of the web services.

NOTE. Before creating a cluster see general recommendations. When working with Linux OS see the nginx build process with the sticky module.

Consider deploying a cluster based on several BI servers of Foresight Analytics Platform, balancer, and the Memcached state server. To create a cluster, determine the following settings:

Set up all BI servers for using one state server

Depending on the balancer in use, determine its settings:

Set up HAProxy balancer

Set up nginx balancer

Set up the web application:

Set up web application for working with balancer

Therefore, a query from the client goes through the web server to the balancer. The balancer selects the BI server, and all queries from this client will be sent to the selected BI server. The BI server after query handling and referring to the DBMS will save parameters of all objects at the state server. If on executing a query the BI server failure occurred, the balancer will resend the query to another BI server, which will restore all necessary objects from the state server, execute the query and create the report for the user.

If the user plans to work with web forms that use the WebSocket protocol, it is required to use the HAProxy balancer. For details about balancer setup see the Setting Up HAProxy Balancer for Working with Web Forms article.

Cluster Standard Operating Mode

The scheme of the cluster standard operating mode:

  1. Query.

  2. Query to BI server.

  3. Query to DBMS.

  4. Get the response from DBMS.

  5. Save the state.

  6. Response from BI server.

  7. Send the obtained data to web server.

Failure of Sending Query to Cluster

The scheme of cluster work on query sending failure:

  1. Query.

  2. Query to BI server. If error occurs, the query is redirected to another BI server.

  3. Restore state.

  4. Query to DBMS.

  5. Get the response from DBMS.

  6. Response from BI server.

  7. Send the obtained data to web server.

See also:

Recommendations for Creating BI Servers Cluster | Building Nginx with the sticky Module in Ubuntu