General Architecture Question
jfrosch Feb 24, 2004 4:00 PMI have relatively low end web servers outside a fire wall. They have 1GB RAM, a 1GHz Pentium III CPU, running RedHat 9.0 (soon ES). Behind the firewall will be much more robust AMD-64 server(s) with yet-to-be-determined OSes and 2-4GB of RAM. These server(s) will definitely be running the database management system, but I'm not sure how I should partition my application code.
From a performance standpoint, would I be better off with:
1) Apache 2.0 on the low end servers serving static content, using the JK2 connector back to JBoss on the faster server for JSP/Servlet/EJB processing
2) Tomcat 5 standalone on the low end servers for handling static content and JSP/Servlet processing, using remote calls (RMI) back to JBoss on the faster server for EJB processing
3) JBoss with Tomcat 5 on the low end servers for handling static content and JSP/Servlet processing, using using remote calls (RMI) back to a different instance of JBoss on the faster server for EJB processing
4) JBoss with Tomcat 5 on the low end servers for handling static content and JSP/Servlet/EJB, using a socket connection to the database on the faster server
I know the best performing architecture is to have the Servlet container in the same VM as the EJB container, so running JBoss with integrated Tomcat makes more sense than Tomcat Standalone and JBoss for EJB. However, I'm a bit less clear about the relative performance of using Apache with JK2 connector to JBoss vs. Tomcat with RMI to JBoss. Either way it seems, data will be moving across the wire.
Also, I'm just not sure if best overall performance wouldn't be having the web apps handled by the slower machines with the EJB and database handling being done by the faster machines.
From a security standpoint, I'm inclined to keep as little nonpublic code as possible outside the firewall. Thus, keeping the EJBs, and even the WAR files that just manage web app workflow, behind the firewall is safer, but may have lower performance than sharing the WAR file load with Tomcat 5 acting as web server and JSP/Servlet container.
Finally, from an ease of maintenance standpoint, it just seems easier to manage one flavor of server (JBoss) than it would be to manage instances of Apache, standalaone Tomcat 5, and JBoss, each with their own unique configuration requirements.
Whew! This is longer than I planned, but I've been wrestling with these choices for some time.
I welcome your ideas and suggestions.