views:

66

answers:

5

Hi

What are the tools for achieving high availability for Java web application.

Thanks

+2  A: 

The main approach to use is not a tool. It's called "quality software" - i.e. you must handle all your resources (including synchronization) properly.

Apache Hadoop is something you can use for distributing and scaling your system. But that's for huge applications.

Load balancing is something to look into as well.

Bozho
Agreed. Best HA is done by design.
Nate
+1  A: 

Maybe you're searching for a clustering solution? There's the OpenSource version of Terracotta's JVM Clustering

Tobias P.
Terracotta is a good thing indeed (+1)
Bozho
Clustering can be done with most open source servers: JBoss for example offers clustering, so does Tomcat. http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.htmlThis is only part of the solution: having high availability in application requires HA in every layer to eliminate single points of failure
Miro A.
+1  A: 

Eliminating single points of failure through redundancy at all tiers of the application. You can ask yourself questions along the lines of "what happens if X fails" and then find ways of mitigating that risk.

btreat
A: 

To start you'll need:

  1. A web app that can be run on multiple web-servers simultaneously.
  2. A load-balancing front-end that can detect failed web-servers and route traffic to other live instances. This part need not be in Java. You will need to find integration point between your load-balancer and web-app container.

After having the initial setup going, you will need to find other probable points of failure like database servers, the load-balancing server itself, DNS server etc. and then try to add redundancy and fail-over switching at these layers too.

You should also consider hardware solutions like RAID, SAN etc.

Tahir Akhtar
+1  A: 

There are at least two main aspects you will have to tackle:

  1. Operational
  2. Architecture, design, code

Each of these elements are large questions. For instance, there are a couple of good sites dedicated to these (see serverfault.com and stackoverflow.com, respectively).

Operational considerations include: scaling deployments including load balancing, disaster recovery, a CDN if possible, and monitoring. Ongoing deployment considerations also are important.

Architecture -> code considerations are numerous and significant. From the architecture of your solution, to the layout of your code for maintainability, and the hardest to attain: correctness. My best suggestion: hire someone with experience. That failing, read books and the like from someone with experience.

Also, in the Java world, it's very important to come to terms with this one important fact: it's likely been written before. This is great news! So many very very bright folks have spent countless hours writing code for you and have made it freely available in places like [Jakarta] Apache, Google Code, Codehaus, Sourceforge, and numerous other open source sites. The more research you do into your question, the more you will find these players appearing. An important skill is determining which available software is a good fit for you.

Folks have contributed other answers with specific technologies of choice, many of which are good suggestions, but it all boils down to the actual problem you are trying to solve, and only you know what that is (well, the question doesn't tell us anyway :D).

joeslice