Load balancing at Github: Why ldirectord?

Updated 1 month, 2 weeks ago

Source: http://www.anchor.com.au/

Some comments on Github’s blog post “How We Made Github Fast” have been asking about why ldirectord was chosen as the load balancer for the new site. Since I made most of the architecture decisions for the Github project, it’s probably easiest if I answer that question directly here, rather than in a comment.

Why ldirectord rocks

The reasons for Github using ldirectord are fairly straightforward:

I have a lot of experience with ldirectord. Never ...

  • 48 comments on this story
PRO

50% positive

Showing 28 relevant reactions out of 48.

Awesome discussion of Linux loadbalancer options - especially in the comments: http://tr.im/MlWp

1 month, 2 weeks ago by lordcope on Twitter

@DonMacAskill Nice! You might also want to check this article out if you have not already seen it. http://bit.ly/8uHacI

3 months, 1 week ago by _carumba on Twitter

Load balancing at Github: Why ldirectord? | Anchor Web Hosting Blog http://bit.ly/280lQf performance loadbalancing scalability

3 months, 4 weeks ago by delicious50 on Twitter

Matt,

Nice Blog, I agree Ldirectord rocks… I too hated paying crazy money for naff hardware load balancers, so built my own using LVS, Ldirectord and Heartbeat. Then I thought he this is pretty good why not sell it… 7 years later Loadbalancer.org owns a small corner of the load balancer appliance market and we’ve added SSL termination, TPROXY, HAProxy, Nginx, feedback agents
... See all content

4 months ago by malcolm on Wordpress

Reading about different approaches to loadbalancing http://bit.ly/2zqyId

4 months, 1 week ago by Rchards on Twitter

Fascinating load balancing post from github hosters, includes contribution from haproxy author http://is.gd/4NFvY

4 months, 1 week ago by zomoco on Twitter

Load Balancing Throwdown: TCP redirectors vs. proxies - http://bit.ly/36cIND

4 months, 1 week ago by nstielau on Twitter

Tyler,

If you just want a “regular” IPVS load balancer, that’s all you need. For a high-availability load balancer (if the active node dies, the other node in the pair will take over), then you need to add Pacemaker, and heartbeat or corosync, to the list of things to put together.

4 months, 2 weeks ago by Davy Jones on Wordpress

Awesome. I don’t mean to turn this blog into a tutorial, so I will keep my questions short and be on my way:

Is “all that chain of tools” available within the heartbeat packages?

Is there anything else that I would need to be familiar with to create a complete LVS load balancer aside from these utilities: iptables, ldirectord or keepalived, and ipvsadm?

Thanks
... See all content

4 months, 2 weeks ago by tylerflint on Wordpress

Interesting discussion of ldirectord VS haproxy here: http://bit.ly/VDhfp (in the comments)

4 months, 2 weeks ago by alexandermensa on Twitter

Débat autour de "ldirectord" vs. "haproxy" sur http://bit.ly/2chBXs (lire le billet, mais surtout les commentaires)

4 months, 2 weeks ago by jlecour on Twitter

@tyterflint: you’re almost right. LVS (or IPVS, 2 names for the same thing) is the Linux kernel subsystem performing the load balancing. Ipvsadm is the utility used to configure LVS. It does not do much, it creates server farms, adds and removes servers, and reports statistics. Ldirectord as well as keepalived which was indicated above are daemons which monitor the servers’ health and add/remove ... See all content

4 months, 2 weeks ago by wtarreau on Wordpress

"If all you needed was a HA load balancer, and had no experience with either ldirectord or keepalived, I’d probably recommend keepalived over ldirectord, as it’s one project and one piece of software to do everything you need."Having used both ldirectord and keepalived at reasonable scale this strikes me as solid advice. We use keepalived -- formerly to run LVS, now ... See all content

4 months, 2 weeks ago by jbyers on Hackernews

This is a great article! I am currently architecting an alternate solution to our current web solution. We too are running 4 web servers and are currently using PF as a load balancer. The main issue with PF is that we can’t implement weighted load balancing…blech. 2 of our servers are substantially larger than the other 2, being the reason we need weighted round robin.

I mostly
... See all content

4 months, 2 weeks ago by tylerflint on Wordpress

If you are interested in ldirectord take a look at the ultramonkey project. http://www.ultramonkey.org/ I've used this on very high traffic sites () on p4 servers. It's almost a replacement for the f5 BigIp boxes.

curse.com survived patch days.

* mainstream media site +600mbs

4 months, 2 weeks ago by egonzalez on Hackernews

Hi Matt,

first, rest assured that I did not take any of your comments as criticism nor attacks, and I’m not dicussing your choices, just about your perception of what proxies can do, nothing else.

Concerning the performance, it depends what you are doing. Direct-routing load balancers installed in one-leg configuration where they only see upstream traffic will always be faster
... See all content

4 months, 2 weeks ago by wtarreau on Wordpress

I once worked with ldirectord (I was shown at a local yet huge startup how they work) and I can say it's pretty awesome. You may integrate what it does at a router-level (newer top-class Cisco routers with modified IOS can do client-persistent –if needed– packet balancing, without having to forward also the responses)It's pretty awesome to just redirect incoming (usually ... See all content

4 months, 2 weeks ago by adrinavarro on Hackernews

Ldirectord does indeed rock. So I’ll just agree.

I do have something to add, though:

I have experience setting ldirectord up to replace a keepalived setup, because for some reason the keepalived process would go catatonic and drop all states in the kernel. Only a kill -9 and restart would cure it. Very unsatisfying.

So I’m not a particularly big fan of keepalived
... See all content

4 months, 2 weeks ago by Morten Liebach on Wordpress

"I don’t think queueing something as time-sensitive as interactive HTTP requests is a good idea." Queuing will happen somewhere in your architecture regardless. If I understand github's setup properly, it'll be in the operating system's accept queue for each backend. We know from queue theory that a queue per worker is inferior to a single queue for all workers.

4 months, 2 weeks ago by jasonwatkinspdx on Hackernews

Yeah, Matt lost me here (in his reply to Willy Tarreau's [HAProxy] comment.) Packet rewriting is nice and efficient, but it's dumb. Unless you measure a latency/cpu need, in a system with lots of moving parts, having high-level ways to control the flow of traffic -- on-the-fly -- is a good thing.

4 months, 2 weeks ago by jeremyw on Hackernews

Interesting discussion on ldirectord vs haproxy http://bit.ly/2chBXs

4 months, 2 weeks ago by AkitaOnRails on Twitter

@codemonkeyism regarding haproxy question: http://bit.ly/2zqyId

4 months, 2 weeks ago by timfaas on Twitter

Do you have any thoughts on using PF for IP-level load balancing?

4 months, 2 weeks ago by btucker on Wordpress

"One geek's opinion on load balancing" http://bit.ly/VDhfp Not sure what L4 appliance was using, but was obviously not right one.

4 months, 2 weeks ago by lmacvittie on Twitter

Hi Willy,

Thanks for taking the time to provide such an in-depth comment.

Sorry if I implied that haproxy couldn’t sustain a certain connection rate. I don’t know what the performance limit is with either haproxy or ldirectord on a given hardware setup — I’ve never benchmarked them to that degree. However, given the amount of work that is required to proxy
... See all content

4 months, 2 weeks ago by matt on Wordpress

Social comments and analytics for this post…

This post was mentioned on Twitter by FastestFood: Load balancing at Github: Why ldirectord? | Anchor Web Hosting Blog http://tinyurl.com/y9f26w3…

4 months, 2 weeks ago by uberVU - social comments on Wordpress

Load balancing at Github: Why ldirectord? | Anchor Web Hosting Blog: Some comments on Github's blog post Ho.. http://bit.ly/1zAKbH

4 months, 2 weeks ago by gogvo_hosting on Twitter

Being the author of haproxy, I can’t agree with all your points against proxies, especially

the points about performance. 2500 connections per second is small for haproxy. This

is what it supports on my 5-watt Geode 500 MHz (it does about 2700 in fact). Some sites using more common hardware (core2duo, dual-opteron, …) and properly setup systems regularly see loads between
... See all content

4 months, 2 weeks ago by wtarreau on Wordpress

© uberVU Ltd. 2010

Terms of use
FEEDBACK