Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clustering and loadbalancing through Java EE

I want to develop clustering and load balancing by using Java EE, I want to use two Tomcats in back-end,If any request arrives to my application it should send request to the tomcats based on the load factor.I want to add fail over and session replication to my application. Please suggest..

  1. The API for load balncing and clustering that i have to use and where it should be down loaded from?
  2. What are the books that i can make reference to make my application programming?
  3. Is Apache web server is useful to my application or not?
  4. what are the sites that i have to use for developing my application?
like image 966
pradeep kumar Avatar asked Dec 30 '09 12:12

pradeep kumar


1 Answers

The API for load balancing and clustering that I have to use and where it should be down loaded from?

Clustering is actually part of the Java EE specification and containers should thus offer support for this (understand here: clustering shouldn't involve programming on your side, you just have to follow some rules when developing your Java EE applications).

In the case of Tomcat, have a look at Tomcat's Load Balancer HOW-TO and more precisely the Tomcat Connectors documentation to implement for software load balancing. Note that many companies prefer and use hardware load-balancing solutions (with products like F5 BIG-IP or Nortel Alteon). This will be a bit more expensive though.

For the load-balancing algorithm, simple round-robin is usually used (this would be my recommendation).

For the session fail-over part, you'll need to use a Persistent Manager, very likely the JDBC Based Store implementation. Just don't forget to make the objects you'll put in session Serializable.

What are the books that I can make reference to make my application programming?

Not sure what you mean by application programming but the simple fact that you are asking this question makes me think that you shouldn't implement your own solution but rather use an existing one (software or hardware).

Is Apache web server is useful to my application or not?

For software load-balancing, Apache (+ mod_jk) would be my choice for the web server. Refer to the Tomcat Connectors documentation previously mentioned.

What are the sites that I have to use for developing my application

Again, I'm not sure what you mean by "developing my application" but the links provided so far are good starting point IMO. If you want to go a bit further, maybe check Under the Hood of J2EE Clustering (this is still a good article, even if not really new). For a more specific answer, ask a more specific question :)

like image 146
Pascal Thivent Avatar answered Sep 30 '22 08:09

Pascal Thivent