I'm writing a small web service(like a content server) to search and serve content. Basically it has 2 parts - one dynamic part performing client authentication and providing search functionality over the content. The second part involves serving static content to the authenticated client.
What can be a good architecture for the above service in terms of performance and scalability?
- Just using an application server(tomcat) to do both?
- But then I hear apache is better at serving static content having easy configurable options like compressing content. So how about using Tomcat as reverse proxy(using j2ep, noodle..) to apache web servers behind. Tomcat can authenticate and search while the apache servers behind can serve the content.
- But Tomcat being the single point of contact, can become a performance bottle neck. So why not use the apache tomcat clustering again to balance load on the entire set up?
Basically I'm looking at a apache-tomcat cluster where each tomcat acts as reverse proxy to a set of apache servers behind. Is this set up possible? Has anyone done this before? I did search on this but unable to find any pointers. If it is possible, are there any potential disadvantages in this architecture?
In case if it is a bad option, what would be the right way to go for this web service?