• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Separating web & business tier to increase scalability

 
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also inline with you. The advantages of this collocated architecture are

1. Ease of administration
2. Flexible load balancing
3. optimal performance

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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Usman Ibrahim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If the former, separating them definitely increases scalability (and performance) because the app server has less work to do.



Provided if there are lots of static pages. What if most of the pages are generated and have to look into business layer to get the data? Its just my understanding, please disagree if I am wrong.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Usman Ibrahim wrote: What if most of the pages are generated and have to look into business layer to get the data? Its just my understanding, please disagree if I am wrong.


That would be the later scenario where determining scalability is a lot more complication/debatable.
 
Bartender
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic