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.

Rgrds,
JV -- julioviegas.com


On Wed, Nov 18, 2009 at 17:24, Nate Smith <nate@xxxxxxxxxxxx> wrote:
We use HAProxy (http://haproxy.1wt.eu) 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.
nate


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

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.
-Sumit

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();
        sessionManager1.setWorkerName("jetty1");
        server1.setHandler(new HelloHandler(9990, sessionManager1));
        server1.setSessionIdManager(sessionManager1);
        server1.start();
        server1.join();

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
</Proxy>

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.
-Sumit


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

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users




--
Nathan Smith
Director of Engineering
SuperFan.com
209 Kearny St. Floor 3  San Francisco, CA 94108
http://superfan.com/nate


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

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top