1

Can you please suggest some of the industry best practices (of the type "it depends") to deal with a WAR (web application archive) deployed into a J2EE container to connect with a RDBMS?

In the current scenario, we deploy the .war file to an Apache Tomcat instance that connects to a PostgreSQL data base instance. We are required to scale up both in terms of data storage and transactions (multi read-write).

It seems, we have two choices.

Build load balancing system

First, we start with Apache Tomcat clustering as described here with a short graphic (from their website) as below.

 DNS Round Robin
               |
         Load Balancer
          /           \
      Cluster1      Cluster2
      /     \        /     \
  Tomcat1 Tomcat2  Tomcat3 Tomcat4

Then, build the database cluster as described here whose graphic is shown belowenter image description here.

Both clustering (Tomcat and PostgreSQL) are front-ended by HAProxy as shown in the graphic below.

enter image description here

Use IaaS provider

Or, perhaps, just set-up the servers in AWS and let AWS manage all balancing while we just pay per use. For example, as described here for a typical set-up and here for AWS PostgreSQL.

Community
  • 1
  • 1
cogitoergosum
  • 2,309
  • 4
  • 38
  • 62

0 Answers0