Project

General

Profile

Session-persistent load balancing without load balancer being bottleneck?

Added by d3fault d3fault about 10 years ago

I lol'd when I realized that using HAProxy to load balance Wt nodes (as described http://redmine.webtoolkit.eu/projects/wt/wiki/Using_HAProxy_as_a_reverse_proxy ) uses layer 7 load balancing.... which imo is NOT load balancing, since all traffic goes through the load balancer in both directions _.

I'm a noob to load balancing and am now stuck trying to find a design where the load balancer isn't the bottleneck (kind of an oxymoron if you ask me).

It it possible to use Wt session persistence at layer 4? What are some other strategies for achieving my goal? What do the big companies do? Is my best best DNS round robin'ing?

OR (going in a different direction)

I'm willing to use dirty hacks to solve this, so I might use plain old url redirecting for the www.domain.com server, randomly selecting subdomains (wt0.domain.com , wt1.domain.com, etc) to handle the session from there on out. My question on this side of the "or" now becomes: can WAnchor do url lying? that is, the url shown when hovering or when doing right-click~~copy-url should show "www.domain.com/path", but when clicked, some javascript jit replaces it to wt0.domain.com/path (retaining whatever subdomain the user has been using so far). google uses url lying on their search results page, so i know it's possible... just not sure WAnchor has that functionality :(.. and i've already written so much code depending on Wt :~~/

Thanks


Replies (3)

RE: Session-persistent load balancing without load balancer being bottleneck? - Added by Koen Deforche about 10 years ago

Hey,

Typically you will use DNS round-robin if you want to deploy multiple HAProxy servers. That should be the case for really big sites, as even a single HAProxy process can saturate a 10-gigabit link. I'm not sure why you believe that the load balancer would quickly become the bottle-neck?

See also: http://www.haproxy.org/10g.html

Regards,

koen

RE: Session-persistent load balancing without load balancer being bottleneck? - Added by d3fault d3fault about 10 years ago

I guess my point/argument is that requiring bandwidth to go through the load balancer itself, is not load balancing. IMO, a load balancer should pass off connections and then be out of the picture (of course session persistence is a problem, hence the thread). Throwing a 10gbps connection at the design is solving the problem incorrectly imo (solves it vertically instead of horizontally).

This appears to be a flaw in HTTP and not inherent to HAProxy/Wt.

... on the other side of the the OR...

I did have success in hacking Wt to do URL lying for internal paths (doing it for external paths or resources would require more hacking) with this very-unfinished-yet-small patch to: src/Wt/WAnchor.C --- it was simple because Wt already intercepts clicks to handle internal paths, so that/the heavy work is already being performed <3

...now if only there was a way to lie about the URL in the address bar :-P [then everything would be so insecure xD]...

RE: Session-persistent load balancing without load balancer being bottleneck? - Added by d3fault d3fault about 10 years ago

Wt would probably need a complete rewrite for this, but it would be cool if you could get all necessary javascript just once (and cached for really long time) from the www.domain.com load balancer, and the javascript then uses wt0.domain.com, wt1.domain.com, ETC, load balancing (with session persistence ofc) behind the scenes.

It wouldn't work for javascript-less clients, but that's the uncommon case now days anyways...

    (1-3/3)