Solved

Setting up infrastructure for a J2EE Application in production

Posted on 2013-12-02
4
340 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
  • 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 26

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 26

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now