Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

Setting up infrastructure for a J2EE Application in production

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
pkrish80
Asked:
pkrish80
  • 2
  • 2
1 Solution
 
pkrish80Author Commented:
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
 
dpearsonCommented:
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
 
pkrish80Author Commented:
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
 
dpearsonCommented:
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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now