Discussions

Performance and scalability: JSP Application Objects in the event of Load Balancer

  1. What is the scope of application object in JSP in a load balancing environment (ie Web farm). Can we design an Application object in this context.

  2. The Application Object is usually scoped to the Web server that it is running on, unless otherwise specified by the vendor. Most cluster implementations ensure that the requests that were handled by a specific server in the cluster will continue to be served by the same server. There may be more sophisticated implementations that maintain application and session states across the whole cluster but I am not aware of them. Maybe someone else can shed some light on the specifics?

    Leo
  3. The Servlet 2.2 specification makes some headway in requiring vendors to support this type of behavior. At this time, I know that WebLogic does not support "distributed" servlets. There are a lot of issues with making this work:

    - distributed application objects
    - synchronized ServletContext objects
    - HttpSession synchronization (which WebLogic and most vendors already do)

    Tyler
  4. You can simply use a load balancing router which supports sticky sessions. Most nice ones like LocalDirector can do this.

    Dave Wolf
    Internet Applications Division
    Sybase
  5. Sybase EAServer supports the distribution of HttpSession objects across cluster memebers.

    Dave Wolf
    Internet Applications Division
    Sybase