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 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, use the HAProxy balancer. For details see the Setting Up HAProxy Balancer for Working with Web Forms section.
If licensing service is used in Linux OS, use the HAProxy balancer to ensure its fault tolerance. For details see the Setting Up HAProxy Balancer Using Licensing Service section.
The scheme of the cluster standard operating mode:
Query.
Query to BI server.
Query to DBMS.
Get the response from DBMS.
Save the state.
Response from BI server.
Send the obtained data to web server.
The scheme of cluster work on query sending failure:
Query.
Query to BI server. If error occurs, the query is redirected to another BI server.
Restore state.
Query to DBMS.
Get the response from DBMS.
Response from BI server.
Send the obtained data to web server.
See also:
Recommendations for Creating BI Servers Cluster | Building Nginx with the sticky Module in Ubuntu