I wanted to ask that what all things i should keep in mind in order to create a high performance STRUTS2 based web application. It is guaranteed that the site will have a high traffic (i.e. lets assume somewhere around 500,000 requests daily). Also there will be a decent lot of database accesses.
Please comment as i have decided of using the following frameworks (or suggest any better alternatives):
Please suggest some performance tuning/enhancement strategies. Thanks!
Couple of things you can do.
First:
the biggest bottleneck in a website is always the database connection. You will need to make sure that your database is running in a separate cluster and try to do more in each database session when using hibernate. The less DB connections you open/close the faster your application will be.
Use hibernate as much as possible because it has logic to cache queries and such. Also if you have the same information being used across the users session, put it on the session object so that you do not have to query the DB for that info multiple times.
Second:
Use the Spring IOC as much as possible. You should create "service" classes that will be doing your database querying and those classes should be created as singletons and injected into a constructor or setter via Spring IOC.
Third:
Make use of a tool like tiles or wicket. It will allow you to create layouts for your JSPs.
Fourth:
If you have data displaying on the page that takes a long time to load/query, go ahead and load the page with the other data that is fast and then load your slow data dynamically through AJAX. It will give the user the impression that they are receiving an immediate result.
Of course there are many other things you can on the server side. You might want to deploy the application across several node and use a load balancer to route traffic to the least busy node. The amount of caching at the proxy, app server, browser, and database you do will also significantly impact your performance.
Hope that helps!