Announcement Announcement Module
Collapse
No announcement yet.
Load balancing at http layer in Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Load balancing at http layer in Spring

    Hi everyone,

    I have 2 app servers, namely A, B and 1 db server. I will also do away
    with ejb and apply load balancing to A and B. Lets say if an insert
    operation is being performed and at the same time A is heavily loaded,
    B takes in this request and do the insert operation into the database.

    Qn:
    Will spring be able to detect this and informs A to ignore about this
    request since B has already done the insert operation?

    Thanks,
    Meng Soon

  • #2
    I would personally stick to doing load balancing at the HTTP level. Basically new users come in, and get directed to either A or B, where they get a new Servlet Session, and from then on the Session affinity keeps them coming back to the same box.

    While it's true this will not load balance for a user on every request, it's quite simple, and ensures that you don't have performance issues with transferring session data across a cluster for every request.

    You can easily do this type of setup with Apache http server, sitting in front of an app server or servlet engine like TomCat, using an apache connector appropriate for the app server or servlet engine.

    Comment

    Working...
    X