aspose file tools*
The moose likes Performance and the fly likes statistics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "statistics" Watch "statistics" New topic
Author

statistics

wu jong
Greenhorn

Joined: May 31, 2005
Posts: 13
one of my client is using a php based application with mysql backend and claims that the application can handle ten thousand concurrent users - do you think it is possible ?

he now has a requirement to support 50,000 concurrent users and wants a scalable application to be built (we intend to use jsps). in order to build such an application, are there any scalability guidelines ?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Those are very big numbers. I'd verify exacly what your client means and how they arrived at this number before accepting this claim.

Dealing with a load of that size does not just come down to the underlying technology used to implement the applcation, but the infrastructure you deploy it on to (hardware load balancing, clustering etc.) PHP is supposidly not as scalable as Java. I suspect this is maybe a bit of a myth - but since I've never done any really big applications with PHP I can't say one way or the other. PHP loses out to Java in other ways (no real support for Unicode, a harder to maintain code base, that a scripting language is no where near as rich as a programming language etc.)

When you hear potentially very big numbers of users and the word "scalability" usually you should think of EJB, which is the technology specifically designed for large applications. That's not to say you can't handle a very large load with a web app but typically you would head for EJB. BUT if you already have an application written in PHP I'd properly examine the potential to scale that as it is.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Paul Sturrock:
When you hear potentially very big numbers of users and the word "scalability" usually you should think of EJB, which is the technology specifically designed for large applications.


Carefull: just using EJBs will likely slow your application down significantly, not improve performance!

What EJBs help with is writing distributed applications, that run on more than one server at a time. You still have to be rather skillfull to come up with a design that won't kill you due to the communication overhead between the servers, though.

Before thinking about EJBs, I'd first try other ways to improve performance: local optimizations of performance bottlenecks, caching, better hardware, adding processors to the server etc.

BUT if you already have an application written in PHP I'd properly examine the potential to scale that as it is.


I wholeheartedly agree!


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
wu jong
Greenhorn

Joined: May 31, 2005
Posts: 13
Thanks for the valuable comments.

Assuming that I use a group of Apache webservers to front end and a Tomcat/JBOSS in a clustered manner and have enough machines (say 4 instances), and a mySQL backed - can I have the ability to hanle more than 25,000 concurrent users (say that there are two simple pages A and B - A retrives a list from a table where are B updates a different table).
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
The number of concurrent users (that is, how many are logged in at the same time) isn't enough data to say anything about it. You need at least *also* to consider:

- how often will those users send a request? Will the read a page for a minute before requesting the next, or will they request new pages every couple of seconds?

- how much effort does the rendering of a page take? How much calculation, how much database access?

- how much data will you need to remember while a user is logged on?

BTW, what kind of system is the PHP application running on?
wu jong
Greenhorn

Joined: May 31, 2005
Posts: 13
Assume that it is a single page that simply accepts either an update to a table or a retrieval and display. For a tiny application like this and with the environment I posted above, how many users can be handled concurrently ? (are there any statistics of sample applications that I can look at to get an idea)
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I don't know, but if I were in your situation, I'd implement a quick prototype and test it using a tool like JMeter. That shouldn't take too long and is likely to give you some reasonable numbers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: statistics