Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how many users tomcat support concurrently

 
Shiva Kumar V
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

I want to know how many concurrent users tomcat 6.0 can support. There is no hard ware constarint.

I am new to web development. One of my friend said it is 50.

Thanks in Advance
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While that article is interesting, it doesn't really address the question. But "50" is definitely not a correct answer. The real answer depends on the definition of "concurrent", on the Tomcat setup, and on the web app in question.

Tomcat has a maximum number of concurrent threads it uses to service requests; this can be configured in conf/server.xml and is by default set to 50. But even if there are more than 50 concurrent requests, those are simply put in a waiting queue (I think) and will be serviced once threads become available.

But "users" is not the same as "requests". Users do not constantly fire requests to the server, and requests are generally handled quickly (generally no more than 10 seconds, and possibly much quicker). So a lot more users can all be using a web app at the same time before the number of 50 active threads is reached. How many that might be depends on the nature of the web app.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Concurrent" is also not the same as "simultaneous". The thread pool size determines maximum thread-simultaneous requests, with the number of CPUs limiting the number of actual-simultaneous requests. The total number of concurrent users of a Tomcat server, however, is limited by the service rate. If a system has a high service rate, it can handle a lot of concurrent users. If it has a low service rate, the thread queues start backing up and the system overloads.
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Shiva,

Your friend is misguided. I have seen bad webapps that stumble and grind to a halt under the load of a dozen or so users and I have seen Tomcats scale to thousands of concurrent users.

If there is no hardware constraint, then that leaves your programming style and the application requirements as the constraints. You need to program in a scalable way. Your application requirements are such that it is easy to partition the application to allow more hardware to have benefit when added.

Without knowing how well your application can be partitioned and how well your code is architected, we cannot answer your question.

Kees Jan
 
Joanna Spark
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there -

We actually answered this question over at TomcatExpert.com today. Check out the post here:
http://www.tomcatexpert.com/ask-the-experts/simultaneous-users

Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic