Solved

Setting up infrastructure for a J2EE Application in production

Posted on 2013-12-02
4
349 Views
Last Modified: 2013-12-18
Hello All,

I am working on designing the infrastructure for a Java/J2EE Application.

The technology stack is Spring MVC, JDBC template, Tomcat 7.0 and Microsoft SQL Server 2012.

The number of users for this application will be in-house company executives.

We have a Windows 2008 server available with 8 GB Memory. I will provide other details as well. This is a legacy infrastructure.

Can I get a suggestion on what type of server hardware do I need to host such an application?

How do I setup clustering for Tomcat and SQL SERVER?

Please let me know if you have more questions
0
Comment
Question by:pkrish80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:pkrish80
ID: 39691685
I am rewriting a legacy .net 2.0 application in Java.

This is an OLTP application with lot of batch processing. The number of users for this application in production will be 75 - 100 users.
0
 
LVL 27

Accepted Solution

by:
dpearson earned 500 total points
ID: 39694086
For such a small number of users you should have no problems running it on a box like your Windows 2008 server with 8 GB of RAM.  That's really a tiny load.  We run a site with about that hardware level and support about 50,000 daily users.

If you want to setup a cluster, then you should be looking at a second identical box, so that if one fails the other handles the load and the site remains up.

For Tomcat you can do simple clustering with just round robin DNS.  You create two DNS entries:

mysite.mycompany.com 123.456.789.1
mysite.mycompany.com 123.456.789.2

Tomcat on one box responds to .1 and Tomcat on the other box responds to .2
This will give you very simple clustering.

If you want to get more complicated you generally put some sort of load balancer (people often use apache) in front of tomcat and have it receive the requests and forward them to the appropriate tomcat server.  apache doesn't do any processing, it's just acting as a forwarding tool.  Either that or you can look at tools like keepalive (http://www.keepalived.org/documentation.html) which is designed to monitor two (or more) servers and route traffic to which is up and responding.

As for the database layer, you again need 2 boxes (they could be the same 2 as are hosting the web servers).  One should be setup as the master and the other the slave.  So all requests would to go the master and then it would be setup to replicate to the slave.  

That way if the master server crashes, you can switch to the slave and be back up.

Technically that's a replicating setup - not really a cluster as all requests are handled by a single database server, but it should be fine for what you need.

The specifics of configuring all of that is beyond my knowledge (esp on Windows - we use Linux) but that's the broad structure you should be considering.

Doug
0
 

Author Comment

by:pkrish80
ID: 39694341
Thanks for the picture, Doug. Just a few more questions

The reason I am using Windows as Microsoft SQL Server is the required DB to use.

When you mean two boxes in your message, Are you saying I should/could have two instances of Windows 2008 servers with one Tomcat and DB Instance each?. If that's correct,

Can you provide some details on what type of hardware are you using for the Linux setup? Also, are you using ubuntu?

The Hardware I have is HP Z820 Workstation.

I don't think I need to install Spring framework on these boxes. Please correct me if I am wrong.


Thanks!
0
 
LVL 27

Expert Comment

by:dpearson
ID: 39694419
When you mean two boxes in your message, Are you saying I should/could have two instances of Windows 2008 servers with one Tomcat and DB Instance each?. If that's correct,
Yes that's right.  When you say "instances" - if these are 2 virtual instances on the same physical box you're only getting partial redundancy.  That helps if you have a software failure, but it won't save you if you have a hardware failure (e.g. motherboard blows up).  To protect against that you should have 2 physical servers (if you can afford it).

Can you provide some details on what type of hardware are you using for the Linux setup?
We use servers from a local builder (http://www.pogolinux.com/) - nothing very fancy: Dual Xeon 5600 processors, 16GB RAM, 3x500GB hard drives in a RAID.

Also, are you using ubuntu?
We use CentOS.

I don't think I need to install Spring framework on these boxes. Please correct me if I am wrong.
Yes that's right.  Anything that the webapp requires should be installed with it.  You shouldn't have to install new stuff into tomcat itself.

Doug
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
The viewer will learn how to implement Singleton Design Pattern in Java.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question