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

Thanks guys for pointers to HAProxy, i will explore that option too. We were exploring apache as a fronting option to multiple jetty instances in the backend because its already deployed on our ec2 and is serving some other web application as well (php based). Let me see how HAProxy fits in.

In the meantime if anyone has had any success with apache+jetty configuration, please do share.

the configuration (that i pasted below) is asking apache to look for jsessionid or JSESSIONID request parameter and redirect the request to the jsessionid that contains a particular workername. This jsessionid is supposedly generated by jetty instances using the startup process i mentioned below (but something is screwed up and i'm not getting those jsessionid there).

Following links were my source of information: (just in case you're interested)

Thanks again,

--- On Thu, 19/11/09, Julio Viegas <julioviegas@xxxxxxxxxxxxxxx> wrote:

From: Julio Viegas <julioviegas@xxxxxxxxxxxxxxx>
Subject: Re: [jetty-users] Sticky load balancing with Jetty
To: "JETTY user mailing list" <jetty-users@xxxxxxxxxxx>
Cc: skbrnwl-dev@xxxxxxxxx
Date: Thursday, 19 November, 2009, 1:09 AM

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

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

Back to the top