We are developing a web application where we are expecting about 100K users per month.
We currently have a complete version based on an MVC Model where struts is the framework, and the Model is regular java classes. We are running tomcat on linux.
Would Tomcat be able to handle this load or will an application server be required?
Are EJBs a must in this situation, and if yes, would stateless EJBs be enough?
What kind of hardware would be required to sustain such a load?
Thank you in advance
Q1. Would Tomcat be able to handle this load or will an application server be required?
A1. I don't think Tomcat is right choice for this load. Also, if you have this big user base, it is a good idea to go for EJBs. Also, only if the Business Logic involved is very critical and large scale. For example if it is a simple shopping cart application with very few items on the catalog, then EJB is not suited again. In either case Tomcat is not a choice as per my view.
Q2. Are EJBs a must in this situation, and if yes, would stateless EJBs be enough?
A2. Again if there a lot of Business Logic involved and lot of database querying is involved in your computation, then EJB is a good solution. About stateless or stateful is really a judgment from your side.
Q3. What kind of hardware would be required to sustain such a load?
A3. I cannot give you a proper answer for this but in my opinion, Linux is good choice and if you are going for EJBs then JBoss in the case of less investment and WebLogic incase you have more to invest (very stable and lot of support etc..).
Some more items...
If you have many complicated business logic involved, then from a project management point of view you would have to invest a lot of man hours in case of EJBs especially if you don't have complete knowledge of it. In these cases, I would recommend a tool called OptimalJ by Compuware. Its a model driven tool that generates your EJB code from the UML Class Diagram. If you spend time in designing the UML diagram then generating the code is a snap. The best part being, you can change anything in the class diagram and again on a press of a button your code is ready. Its very difficult in other cases.
If you want more information on OptimalJ, email me at chandrra2000 at yahoo dot com
When you say you are expecting 100K users per month, its not very clear. Do you mean that these 100K are unique users, will they be using the application everyday..?
You have to see what kind of average load your system should expect at any point of time, AND account for the peak times as well. Then decide on the technology which will be able to handle the peak times without crashing or significantly slowing down.
For a guideline of what factors to consider for ejb technology, you can refer to an article from the serverside itself: https://www.theserverside.com/resources/article.jsp?l=Is-EJB-Appropriate#
As for what type of EJBs to use (Stateless etc) totally depends on your application and the nature of the object / transaction they represent. But as a rule of thumb Stateless session beans are better in terms of performance, and DONT overuse entity beans.
As for the app server. My personal favourite is Weblogic on Linux. It's stable. OC4J is good too. (Havent used WebSphere, but some programmers swear by it).
Read the reviews before making a decision.
A thread for Orion review exists on serverside on:
and for weblogic on:
Thank you guys for your feedback. My thoughts were similar to yours, I just needed a confirmation from the experts. Truly, I wanted to avoid EJBs as much as possible. but no such luck.
Thank you again