Earlier quoted context omitted.
Then you design your system to always respond as quickly as possible. HTTP even has a status code for that: 202 Accepted. You put the job in a queue and return some ID or cookie to the client, possibly also an ETA. Client can then poll for results (with bounded exponential back-off), again polling is just a quick key look-up; alternatively, if you have some means to push results to clients (like via WebSockets), use…
I'm not sure how that would solve the problem. Not every server is a front end web server. Think of something like video transcoding, or complex database queries. At some point you are going to have a number of servers that do the work, and a load balancer needs to balance the work between them. If one server is busy with a job that will take an hour, there's no point in randomly queueing up lots of work while others…
Interns with toasters: how I taught people about load balancers
91–100 of 124 posts
Re: Interns with toasters: how I taught people about load balancers
#92Earlier quoted context omitted.
At work we have two endpoints on every service, `/status` and `/health-check`. The former is basically a "return true" endpoint, which can tell you if the service is alive and reachable. The latter will usually do something like "select 1;" from any attached databases and only succeed if everything is OK.
And the former is the one you want your Load Balancers to be checking. With a deep health check, even a brief database outage will cause every web server to be taken out of rotation, and then you're completely down for at least as many health check intervals as it takes for the LB to consider a host healthy again. Same goes for any other shared resource that is likely to affect all web servers if it becomes unavailab…
Re: Interns with toasters: how I taught people about load balancers
#93Maybe some people dismissed her problem as 'impossible' because she didn't inform what kind of load balancing technique was the load balancer using? I suspect what happened is that they didn't understand the problem, and so resorted to ineffective means to steer the attention away from their own inadequacies. ^ This statement is kinda harsh.
Every post on that blog is about how the author is incredibly clever and surrounded by dolts.
Anyway, several of the posts tend to do quite well on HN, so it looks like commenters look past that when they engage with the stories.
Re: Interns with toasters: how I taught people about load balancers
#94This reminds me strongly of another system of distribution, which suffers from the same effect: differential gearboxes in cars. Since the torque to all the wheels is equal, if one wheel slips it very quickly takes all of the power of the engine, since power = rotational velocity * torque. Only if the speeds are similar is the allocation of power to the wheels similar. In cars, the solution is to make sure that the po…
There are a variety of mechanical systems used to combat this problem, not just thick grease. Limited Slip differentials can be employed to ensure that one wheel can only slip so far before the differential locks and then both wheels are forced to rotate together. LSDs can be employed in 3 positions front, rear, and center. The front and rear will lock left and right wheels together, the center one will lock the rota…
Re: Interns with toasters: how I taught people about load balancers
#95Earlier quoted context omitted.
And the former is the one you want your Load Balancers to be checking. With a deep health check, even a brief database outage will cause every web server to be taken out of rotation, and then you're completely down for at least as many health check intervals as it takes for the LB to consider a host healthy again. Same goes for any other shared resource that is likely to affect all web servers if it becomes unavailab…
Databases are 10-100x as reliable as the application tier in my experience
Re: Interns with toasters: how I taught people about load balancers
#96Earlier quoted context omitted.
And the former is the one you want your Load Balancers to be checking. With a deep health check, even a brief database outage will cause every web server to be taken out of rotation, and then you're completely down for at least as many health check intervals as it takes for the LB to consider a host healthy again. Same goes for any other shared resource that is likely to affect all web servers if it becomes unavailab…
Or you just have smarter load balancers, that realize when all of their servers are acting funky and stop taking servers out of rotation.
Then if all 100/100 nodes get taken down by some shared problem, the system simply degenerates into picking the idle-est of the 100.
Re: Interns with toasters: how I taught people about load balancers
#97Earlier quoted context omitted.
Random balancing only works with homogenous servers.
Isn't it almost always advisable to have homogenous servers in a web farm? What are some example cases there that doesn't make sense?
Re: Interns with toasters: how I taught people about load balancers
#98> This is what happened when one bad web server decided it was going to fail all of its requests, and would do so while incurring the absolute minimum amount of load on itself. Good ELI5 explanation, but it doesn't really explain why the webserver failed the requests as it did. Or maybe I'm missing something?
Re: Interns with toasters: how I taught people about load balancers
#99I feel like if you have to teach them about load balancers as college interns, FB needs to find a better school to pull interns from.
Also, don't mistake her teaching approach as indicating the people in the room weren't aware of what load balancers are or how they work. It's a good teaching technique to start out with some basic ground-work leading in to the point you wish to make. Starting out as she does ensures that everyone in the group knows _exactly_ what she's talking about before she gets to the key point, _and_ should be able to immediately understand what is going on and why.
Regardless of that, there's a lot of subtleties of dealing with load balancers that people rarely think of until they've been bitten by them. I've used load balancers quite regularly when interviewing candidates because I can almost always find some aspect of land balancers and load balancer behaviour that people aren't aware of. That gives me an ideal chance to explore a subject with a candidate and find out how quickly they can piece things together and learn.