About J2EE Application Server Scalibility Issue

Bozidar Dangubic

  1. Does scalibility means supporting mulitiple concurrent users alone?
    Scalability means that the performance of the application does not deteriorate greatly as more users are connected to the system. A scalable system will perform to its expectations as more users are simultaneously using the system up to some threshold.
  2. It is said any application developed using the J2EE framework would be highly scalable. Now does the specification say the limit of concurrent users, the J2EE complaint app. server should support?
    No. The specification is not specific on the number of concurrent users J2EE compliant app server should support. The more it will support, the more it will sell so it is in the interest of the company developing the app server to have this as high of a number as possible. But maximum number of concurrent users is not only as function of the capacity of the app server. It depends on many other things in the application. For one, database. You can have an app server that support 1 million concurrent users but if the database can handle only 100,000 connections to it, your threshold become your lowest common denominator, that is database in this case.
  3. If an application needs to support 2000 concurrent users, is it necessary to use EJB's to take advantage of the J2EE application server's capability or just using JSP's and Servlets alone could be scalable?
    That also depends on the application. Using JSPs/Servlets alone could do the trick since they are multithreaded and can handle many simultaneous users but of course there is a limit. What that limit is needs to be tested for a given deployment. Any web-enabled application needs to be capacity tested to ensure that it will properly function under high load. 2000 users is not that much so I think JSP/Servlet solution could handle that many users at once. But keep in mind that you are developing an application that is likely composed of JSP/Servlet, JavaBeans, and perhaps EJBs. Just by adding EJBs to the picture does not necessarily mean that your application is more scalable. If you think about it, lets take your example of 2000 users hitting an application at once under normal load. Lets also say that you get an increase to about 2,500 and clients start to complain that the application all of a sudden is slow and does not perform to their expectations. simply adding EJBs to this application will not solve your problem. This is because the threads of execution still go through the browser so your web tier still has 2,500 user load. So you may need to load balance the web-tier across several web servers or do something else. Thinking that you will increase the scalability by adding EJBs to the picture is flawed. overall, J2EE applications are highly scalable because they always offer an alternative that will make the application more scalable. e.g. your web-tier is a bottleneck, load balance across several web server. You application server is a bottleneck, you can cluster. if you keep in mind what makes an application scalable and distribute the work to the appropriate tier in the n-tier J2EE application you will have a scalable system. But you have to know the technology to make this happen.