Does separation of web & business tier increase scalability?
I have slightly different opinion on this. I feel that web & business tier should ideally be running in the same JVM. We increase performance & scalability as we do away with remote calls which have a overhead in terms of sending data across network & the serialization de-serialization that needs to happen. Why spend CPU & memory on these activities as these (CPU & memory) are precious resources. If load on application increases I can add additional instances of servers/JVM's which will include both the web & business tier.
The other downside is that by splitting web & business tier I will always need start with at-least 4 boxes to address availability. 2 boxes for web tier & another 2 for app tier. By combining web & app tier I could just start with 2 boxes & then incrementally add as application load increases. So to start with my outlay on hardware will also be less.
I am also reluctant in introducing a http server just for displaying static web pages because the application we are designing is a brand new application and is not an extension to an already existing web application, which was displaying static web pages. More over, we lose the advantages of advanced load balancing policies for accessing the servlets or clustered ejb objects if we use http server in front of web/app server.
When we talk about the web tier, are we talking about static pages or the application's servlet layer? If the former, separating them definitely increases scalability (and performance) because the app server has less work to do.
If the later, it is a lot trickier. I think it is better to not separate them for all the reasons listed above. But the question isn't whether it is better. The question is whether it is more scalable. And I think one could make a case for both yes and no without any further context.
If web server is meant by HTTP Server- like IPlant, Apache Web Server or IBM Http Web Server. I will always go for a medium to big size enterprise application in which Web server and application server are on different JVMs. There are many advantages:
1) Static content can be present only the Web server and they are better in terms in performance and maintainability.
2) Good design for CDN
3) What if in the future - we want to change the Application Server from JEE to some other technology, these kind of transformations will be easy.
4) Site maintenance activities can be better done in this configuration - using landing page etc...
5) Overall load balancing, controlling the traffic is also better done.
Apache & IBM Http Server (built on Apache) are pure web servers that handle HTTP requests & do not run or use a JVM. My original question was regarding separation of web tier & business tier, resulting in servlets/JSP's running on separate JVM & the business tier (EJB's) running in a separate JVM.
I believe that frontending web application with a pure web server like Apache has benefits, some of which you have listed. In addition to what you have mentioned, HTTP server could be used for termination of SSL connections, which means that SSL related processing is offloaded to the web server. The Http server is also used for sticky sessions/session affinity.