• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Advantages And Disavantages Of Tomcat

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one advice on the advantages and disadvantages of using tomcat as container for a web application which is expected to handle heavy load
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi santosh,

advantages/disadvantages of Tomcat in contrast to what alternatives? I think it's hard to give a good answer to this question without knowing more details. Tomcat probably doesn't give you the same performance like Apache for example when you have static HTML contents. But that depends on your application of course. Also there are a lot more aspects you have to consider like clustering, load-balancing, session handling in a cluster and many more. For this reason it's not as easy as it may seem to gain more performance by simply substituting one server product with another. If you're talking about really heavy traffic there's often no other way to go than clustering multiple servers and then the overall performance depends on a lot of other factors besides the web server product. If you have an application which doesn't scale well in a clustered environment that could be your bottleneck and it wouldn't matter which server you're using. If your application relies a lot on database access the database server(s) could be a bottleneck as well.

Besides these points there are even more aspects to consider when running web applications under heavy load. Unfortunately it's not possible to give really good advices without knowing the exact requirements of the software, what "heavy" load means for you etc.

I've seen web applications in production use which worked really fine on a single server with 20-25 requests per second (which is surely not really heavy load). In this situation it was enough to have slightly more users and everything broke down with about 30 req./s.

So the best way could be to simply test your application before launching it for production use! Make an estimation how many users/request you could probably expect and then stress test your application! This will show you where the bottlenecks are and you can still think about optimization where it's really needed!

Marco

[ November 15, 2008: Message edited by: Marco Ehrentreich ]
[ November 15, 2008: Message edited by: Marco Ehrentreich ]
 
Santosh Raveendran
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marco

Thanks lot for the detailed explanation i totally agree to the fact that clustering, load-balancing will improve the performance of the application but my question is for a particular sofware and harware requirement
in a non clustered environment without a load balancer which app server
would be the best choice , if we consider server like tomcat,jboss,weblogic, is there any limitation container wise for the maximum number of requests it can handle at any time.


Thanks
santhosh
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no general answer to that question. Each server has its own strengths and weaknesses, and whether those are exposed by your particular code is highly dependent on, well, your particular code.

If you're really considering WebLogic (which costs serious money, after all) then you (or your manager) should budget for some time to run performance tests with the application against each server.
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is exactly my opinion, too. There are too many specific problems to give a general answer to such comparison questions even though many benchmarks may suggest that it's possible.

Besides your code there are other problems like the ratio between static and dynamic content. The underlying operating system and hardware may not behave exactly equal for all servers out of the box. Each server product has lots of tweaking options but you/your admin needs a deeper knowledge of all this little configuration parameters to use it wise etc.

Still the best idea will be to do some performance tests as Ulf suggests, too. I don't have practical experience with commercial application servers, so I can't tell you if these are better than opensource alternatives regarding performance but often it's only the support which makes commercial products "better".

If you plan to use an opensource server in contrast, I think it comes down to the most popular alternatives like Tomcat, Jetty and Resin which are also used as servlet container within full application servers like Glassfish, Jboss, Geronimo etc. Take two or three of these web containers and do some testing. Then you'll know if it really makes a difference for your application.

Marco
 
Santosh Raveendran
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot Ulf and Marco for the detailed advice
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic