aspose file tools*
The moose likes Tomcat and the fly likes About load balancing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "About load balancing" Watch "About load balancing" New topic
Author

About load balancing

Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
What you people say about connecting apache with tomcat using JK1.2.8?

Is load balancing really needed with Tomcat 5.0.x or Tomcat 5.5.x? or mod_proxy would be enough? or nothing really needed?

Have searched it and found positive answers as well. Waiting for Ben's reply especially, as we have talked over it a bit sometimes back.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Adeel Ansari:
Is load balancing really needed with Tomcat 5.0.x or Tomcat 5.5.x? or mod_proxy would be enough? or nothing really needed?

The question of whether load balancing is needed with {your application server} does not make sense without knowledge of how well a single instance of {your application server} manages the load you're expecting to get.

If the single server instance is not enough, you need more instances. Simple as that. And once you reach the point where you need more than one instance, then you need load balancing for directing incoming requests to your multiple instances.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Naina Si
Ranch Hand

Joined: Nov 05, 2003
Posts: 134
How efficient is load balancing in Apache/Tomcat as opposed to other servers like WebSphere etc.?

Any pros & cons when compared with other application servers?
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
If you put Apache server in front of your Tomcat servers, you can use mod_jk's load-balancing capabilities or mod_proxy.

For load balancing in Tomcat, see below:

Tomcat 5.0.15 and later ships with a webapp named balancer. This is a simple implemention of a rules-based load balancer. It was not designed as a replacement for other load-balancing mechanisms used for high traffic environments. Rather, it is a simple, pure Java, easily extensible, and fast way to direct traffic among multiple servers.

Although balancer ships with Tomcat, it is not Tomcat-specific and runs on other containers without any modification. The balancer webapp requires a Servlet Specification 2.3 or later container if you wish to use a filter to redirect traffic. If you wish to redirect traffic using a servlet, you may use any servlet container.

[ March 03, 2005: Message edited by: Surasak Leenapongpanit ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Surasak Leenapongpanit:
If you put Apache server in front of your Tomcat servers, you can use mod_jk's load-balancing capabilities or mod_proxy.


Thanks Surasak. I knew all these things. I have asked, would it really effective or not.

Thanks Lasse Koskela for the input. Right now our app is running liek champ, just worrying for the future loads.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Try some load tests and you will see how your application will be ready for higher load.


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by David Ulicny:
Try some load tests and you will see how your application will be ready for higher load.


Yeah started doing that.
Thanks for your advice, David.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About load balancing