Helical Insight

A Business Intelligence Framework
  • Differentiators
    • BI Framework
    • Canned Report
    • API Support
    • Workflow
    • Instant BI
  • Learn
    • Documentation Guide
    • Tutorial Videos
  • Demos
    • Industry specific demo
    • Job functions specific demo
    • Miscellaneous Use Cases
  • Clients
  • Forum
  • Contact Us
  • Free Download
Introducing World's First
Business Intelligence (BI)
Framework
Read more
Helical Insight Community Edition
Open Source
Github
Open Source With Lowest
Total Cost Of Ownership
And High ROI
Make Quick Informed
Decisions From Your
Complex Multiple
Data Sources
Various Data Visualization Options Like Reports, Dashboard, Geographical
Analytics, Statistical & Scientific Charts etc.

Load Balancing and Availability Solution with Test Cases

Introduction:This document consists of proof of concept details for the implementation of load balancing and high availability solution within the Helical Insight application.

Background : A web application hosted on a single node has many disadvantages mainly like unavailability in case of node failure and degraded performance in case of huge load.

To address these problems, we have designed a solution that hosts the application on multiple nodes which share the load and provide high availability.

Approach:

Solution Detail:

This section provides the High level explanation of the the solution.

  1. The HI application needs to be manually installed on multiple tomcats, preferable on different nodes.
  2. The application hosted on multiple nodes need to be configured to a single repository.
  3. A Apache HTTPD server need to be installed on one of the above nodes or separate node. This HTTPD server needs to be configured using the mod_jk algorithm with all of the available application tomcats.
  4. Clustering needs to be enabled within each of the tomcats.

User Story Details :

    1. Lets assume we have the HI application installed and setup on a two node clustered environment.

    1. User “A” accesses the Apache server which is configured to redirect the traffic to the available node. As per the configuration, the traffic is redirected to one of the available nodes i.e., lets say tomcat1.

    1. User “B” accesses the Apache server .If tomcat1 is busy then the traffic is redirected to the other available node i.e., lets say tomcat2.

  1. While navigating through the application as user “A”, lets assume that the serving tomcat, which in this case is tomcat1 becomes unresponsive/shuts down, then the traffic is automatically redirected to tomcat2. This proves the high availability functionality.

Prerequisites :

    1. Download and install the Apache HTTPD server(version 2.4 has been used in this POC) from the below link.

Apache HTTPD server

    1. Download and install two tomcat instances(version 7 has been used in this POC).

Tomcat Instances

    1. Download and install tomcat connector mod_jk (version 1.2.40 has been used in this POC).

Tomcat Connector

  1. Obtain the HI application tar ball(version 3.1.0 has been used in this POC).
  2. Download and install mysql server(version 8.0 has been used in this POC).

Phase wise configuration and testing of the POC :

Phase 1

  • To setup apache httpd server
  • To setup apache tomcat server 1
  • To setupt apache tomcat server 2
  • Setup up working module between httpd server with tomcat 1 and tomcat 2
  • Create an index.jsp file which will print “hello from tomcat x” and keep it inside tomcat 1 and 2 to test the same
  • LB and HA should be implemented in this case

Test cases

  1. stop tomcat 2 and check if the url is still serving from tomcat 1
  2. stop tomcat 1 and check if the url is still serving from tomcat 2
  3. test it with 100 threads and check occassinally we should be getting content from tomcat 1 and tomcat 2

Phase 2

  1. Install mysql
  2. Install HI on tomcat 1 pointing it to hi-repository and mysql
  3. Install HI on tomcat 2 pointing it to hi-repository and mysql
  4. Implement sticky session so that user should not be logged out in case of any failure of the server
  5. Follow phase 1 test case

Phase 3

  1. To be tested in separate h/w and n/w

Setting up the configuration :

The POC has been tested successfully on a standalone windows 10 64 bit machine.

    • Apache HTTPD Configuration:
      1. Unzip the Apache server zip file into any desired location within your machine.

      1. Create a new workers.properties file within the conf directory of the Apache server.

      1. Edit the workers.properties file as per below.

      1. Copy the mod_jk.so file from the downloaded tomcat-connector and place it in the modules folder of the Apache installation.

      1. Edit/add the httpd.conf file within the conf folder of Apache installation as per below.

    • Tomcat Configuration :
      1. Edit/add the server.xml file within the conf directory of the tomcat installation.

      1. As the tomcats are running on the same node the boot-up, shutdown and AJP ports should be unique.

      1. Below details need to be added to configure clustering within the tomcats.

      1. Make the above changes within tomcat2 as well.
    • Application Installation:
      1. Copy the hi-repository folder from the original installation and place it in a new path.

      1. Edit/add the below details within the settings.xml file of the hi-repository path “hi-repository\System\Admin”.

      1. Copy the hi-ee.war file from the original application installation path place it in the tomcat webapps folder.
      2. Now start the tomcat from command line using “catalina.bat start” command(abort the boot-up upon receiving an error).
      3. A new hi-ee application folder is now created within the webapps folder.

      1. Edit the files “application-context.xml”, “log4j.properties” and “project.properties” in the path “\webapps\hi-ee\WEB-INF\classes” as per below on each of the tomcats.

application-context.xml

Mention the mysql server details within the HikariDatasource and add the mysqldialect to replace apache derby database(default).

log4j.properties

Map this location to the common hi-repository.

project.properties

Map these locations to the common hi-repository location.

      1. Now redirect the default tomcat homepage within each of the tomcats by creating an index.html with the ROOT folder of the webapps.

The port number should be as per the tomcats port number.

Testing:

Phase 1:

Test cases

    1. Stop tomcat 2 and check if the url is still serving from tomcat 1

Results:

      • Stopped tomcat2

      • check if the url is still serving from tomcat 1

    1. Stop tomcat 1 and check if the url is still serving from tomcat 2

Results:

      • Stopped tomcat1

      • check if the url is still serving from tomcat 2

    1. Test it with 100 threads and check occasionally we should be getting content from tomcat 1 and tomcat 2

Results:

Using Bulk URL opener to hit the webpage with 100 threads

Phase 2

Test Cases

    1. Stop tomcat 2 and check if the application url is still serving requests.

Results:

      • Stopped tomcat2

      • check if the application url is still serving requests.

Results:

    1. Stop tomcat 1 and check if the url is still serving requests.

Results:

      • Stopped tomcat1

      • check if the url is serving requests.

    1. Test it with 100 threads and check occasionally we should be getting content from tomcat 1 and tomcat 2

Results: TBC

Phase 3

Results:

Using Bulk URL opener to hit the webpage with 100 threads

1st Thread:

49th Thread:


Thank You
Sai Charan
Helical Insight

load balancing

Share with

  • Facebook
  • Twitter
  • LinkedIn
How to add target lines and background color in D3 Charts
Setting ‘ALL’ as the Default Input Parameter Value in Community Reports

Written by Shailaja Ramchander

Shailaja

Related Posts

  • Installation of SQL Server on windows & Creating data source connection in Helical Insight to SQL Server
  • Connecting to Google Big Query using Helical Insight
  • Configure JAVA_HOME/JRE_HOME Environment Variables For Linux
  • Implementing Single Sign On (SSO) in the Helical Insight Application 3.1 Version
  • Home
  • Career
  • Downloads
  • Blog
  • Enterprise Edition
  • Community Edition
  • Learn
  • Video Guides
  • Documentation
  • Press Release

Demos

  • Industry specific demo
  • Job functions specific demo
  • Miscellaneous Use Cases
  • Partners
  • Channel Partners
  • Solution Partners
  • OEM Partners
  • Facebook
  • Twitter
  • Youtube
  • LinkedIn

WordPress Lightbox

Contact Us

✓ Valid Invalid number

Register

✓ Valid Invalid number
Refresh