I have a JavaEE application: 1 EAR using EJB and SOAP; some WARs using Servlets. Currently, EARs are deployed to Glassfish 3.1.2 (Community Edition) and WARs either on tomcat or also on the Glassfish server.
The application is supported by the MySQL database and basically executes some trivial data arrays in and out of the database. Virtually no static content. In the current architecture, virtually no requests can be resolved by the war itself and are always associated with the EAR (perhaps this can change with some reorganization).
This works out of the box for 20 concurrent users and with some configuration of the HTTP thread pool for up to 200 concurrent users on a medium-sized server.
Now I need to scale the application to cope with 1,000,000 users (this is not an optimistic assumption, but a realistic requirement for business, most of the "users" will be devices deployed in the field).
How to scale this application to work with 1.000.000 simultaneous users? Special:
- Should I be able to get more than 200-500 users served by one Glassfish server (for not too demanding webapp)? If so, what should I aim for?
- fiberglass clusters are apparently an option, but how far is this scale? Even then, launching 1000-2000 servers (even in the cloud) does not really seem attractive to me.
- If tomcat / glassfish is the wrong answer, what are the alternatives?
- The webapp is currently the bottleneck, but I assume that at some point the database can also become a problem. How well does MySQL scale to this size?
source share