Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Sticky load balancing with Jetty

I second haproxy for load balance. It has also heat-beat checking and graceful request redirection when a node(Jetty in this case) stops. Very useful for "real" hotdeploy configs i.e. change app without interrupting service.

JV --

On Wed, Nov 18, 2009 at 17:24, Nate Smith <nate@xxxxxxxxxxxx> wrote:
We use HAProxy ( as a load-balancing solution.  It has a configuration option for session-stickiness.  I don't know if Apache can be configured for sticky sessions or not, but it does not appear to be set in the config you posted.

Hope that helps.

On Wed, Nov 18, 2009 at 2:03 AM, Sumit Kumar <skbrnwl-dev@xxxxxxxxx> wrote:

I first sent to the SF mailing list but got no replies and then came across this mailing list. Hope to hear from someone. By the way, i'm using jetty 6 if that matters.

Thanks in advance.

From: Sumit Kumar <skbrnwl-dev@xxxxxxxxx>
Subject: Sticky load balancing with Jetty
To: jetty-support@xxxxxxxxxxxxxxxxxxxxx
Date: Tuesday, 17 November, 2009, 1:34 PM

Hi all,

I'm trying to front multiple jetty instances with apache. Did bit of googling and ended up with a configuration which does pass my requests to those instances in round robin fashion. However there is no stickyness coming up with those jetty instances. I'm starting my them something like this:

        Server server1 = new Server(9990);
        HashSessionIdManager sessionManager1 = new HashSessionIdManager();
        server1.setHandler(new HelloHandler(9990, sessionManager1));

And my apache has the following configuration:

ProxyPass /balancer balancer://mycluster/context stickysession=JSESSIONID|jsessionid nofailover=On
<Proxy balancer://mycluster>
    BalancerMember http://localhost:9990 route=jetty1
    BalancerMember http://localhost:9992 route=jetty2

But for some reason, i don't see those jsessionid or JSESSIONID request parameters coming in my requests (or cookies). Any idea what i might be doing wrong?

Thanks in advance.

The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

jetty-users mailing list

Nathan Smith
Director of Engineering
209 Kearny St. Floor 3  San Francisco, CA 94108

SuperFan ... for the fans, by the fans.

jetty-users mailing list

Back to the top