Human Being
Human Being

Reputation: 8387

Steps to Configure the Clustering and Load balancing with Tomcat?

I recently learned the difference between Clustering and Load balancing.

I have an chat application and I need it to test with the load balancing and clustering.

I googled a lot and can't get an exact answer .

I don't know how to configure this with tomcat.

Hope our Stack users will give the best answer and will give the configuration steps and required servers and files for me.

Upvotes: 0

Views: 1840

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48067

Tomcat clustering typically means session replication - something that might not be what you expect when you have a chat application that is deployed on two servers. I'm afraid, I expect you will have to explicitly code some business-layer code to be able to have user 1, connected to tomcat 1, being able to chat to user 2 on tomcat 2.

Configuring tomcat as a cluster will help your loadbalancer to balance requests from tomcat 1 to tomcat 2 in the event that tomcat 1 will fail (typically the user continues to be logged in in a tomcat cluster installation). But it won't do anything to help your chat to be magically distributed between the two servers.

I'm suspecting that this is what got you puzzled - it seems to be something different compared to what you're looking for. (I'm only guessing this based on the little bit of information that you give)

I'm afraid, I don't expect anybody to provide configuration files that will magically work (or I misinterpreted your question)

Upvotes: 2

Related Questions