We have about 100000 registered users and about 5000 users concurrent users at peek. Our application is an archival front end system. All the index information and objects are stored in archive server with API access. We send queries to the archive server for index records and list returned result to users for them to pick documents for viewing. Currently we use only servlet and jsp, no EJB at all. If we cache the qurey result, then the we can have less accesses to the archive server and fast response time to users. But as the cache builts up to certain size, it may have negative impact on the performance. I don’t want to get blamed for introducing something that causes trouble.

Each query returns up to 50 records with an average 1000 bytes per record. If each user has 5 queries cached. It takes 250KB in memory per user, over 1GB for all the users. Besides the memory, as the number of entries grows, the managment of the data structure also adds overheads.

Another concern with the re-engineering of the project, I want to move it to EJB. There is no doubt that EJB adds more overheads and latency than just servlet and jsp. But the servlet and jsp are hard to manage as the application grows. Again I need to have some real numbers to assess the performance impact. I really appreciate all of your information and opions.

EBay and Amazon certainly have much larger users base and higher volume of transactions. Anybody knows how they do it?