TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Load balancing and its different types

86 点作者 saranshk超过 4 年前

8 条评论

dragontamer超过 4 年前
Load balancing as a strategy is used in far more than just web-applications!<p>This article only discusses web-based load balancing, which is absolutely important, but doesn&#x27;t discuss supercomputer scheduling load-balancing. Its arguably a different subject... but the concept is the same.<p>When you have 4000 nodes on a supercomputer, how do you distribute the problem such that all the nodes have something to do? Supercomputer problems are sometimes predictable (ie: matrix-multiplications), and you can sometimes &quot;perfectly load balance without communication&quot;.<p>But in the case of web-applications, there&#x27;s probably no way to really predict the &quot;cost of performance&quot; before you start processing the service request (what if its a Facebook request to a really old photograph? Facebook may have to pull it out of long-term storage before it can service that request. There&#x27;s no real way to know at the load-balancer whether a picture-request would be in the cache or not... at least, not before you process the request to begin with!)<p>-----------<p>In any case, I think adding &quot;Predict the computational cost, calculate the costs you distributed to different nodes, and then distribute the new load to the node with lowest computational cost given so far&quot; is a good method that works in some applications. (All blocks in a dense matrix multiplication have the same cost, so just keep passing out subblocks to all nodes as you&#x27;re working on the problem)
评论 #25920284 未加载
评论 #25920952 未加载
评论 #25920237 未加载
r0mdau超过 4 年前
Software load balancing solutions have now more algorithms such as least time (nginx+ for example). And yes some ISP cache DNS entries for a long time... But DNS load balancing should be used only on disaster scenarios to mitigate.
评论 #25920810 未加载
评论 #25919859 未加载
sparrc超过 4 年前
Decent summary but a little out-dated on DNS load balancing.<p>Major cloud services like AWS support health&#x2F;status checks through DNS these days: <a href="https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;Route53&#x2F;latest&#x2F;DeveloperGuide&#x2F;resource-record-sets-values-multivalue.html#rrsets-values-multivalue-associate-with-health-check" rel="nofollow">https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;Route53&#x2F;latest&#x2F;DeveloperGuide&#x2F;re...</a><p>It&#x27;s also trivial to get around the client caching issue, just set a low TTL. Perhaps in the olden days providers had stricter limits on the minimum TTL you can set, but these days you can set it practically as low as you want.<p>EDIT: as a few commenters have fairly pointed out, TTL can easily be ignored by poorly-behaved ISPs and clients, so I&#x27;ll admit calling it &quot;trivial&quot; to get around is not exactly accurate.
评论 #25919452 未加载
评论 #25919396 未加载
评论 #25920392 未加载
评论 #25920534 未加载
评论 #25919266 未加载
Terretta超过 4 年前
I like this intro!<p>Good to see ‘random’ redefined as pick random two then assign to one with least connections, which works strictly better than either random or least connections alone.<p>Misses a couple categories that may be relevant: least hops or best transit type network-mapped balancing to get to the ideal set of servers globally, as well as a technique that not-so-simply connects the user to the geography with the fastest response for them right then.<p>While the article notes value of fewer connections for a stream, you can take a bit longer in setup for a stream to get it right, as you and the viewer will pay the price longer if you get it wrong.<p>All this gets much more complicated when balancing very large objects, as you have to consider content availability and cache bin packing among the servers you balance to.
评论 #25919757 未加载
supernova87a超过 4 年前
Speaking of, seems like wisdomgeek.com needs some load balancing right now...
评论 #25921152 未加载
nwsm超过 4 年前
Nice succinct writeup. Here&#x27;s a great deep dive on &quot;Practical Load Balancing with Consistent Hashing&quot; from a Vimeo engineer (2017) [0].<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=jk6oiBJxcaA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=jk6oiBJxcaA</a>
Yhippa超过 4 年前
I was explaining the DNS system and load balancing today and I kind of mixed it all up based on this wonderful link. Thanks, I will share this out with that person to undo the damage I might have done.
评论 #25920210 未加载
kvhdude超过 4 年前
i would have liked to see details of layer4 vs layer7 load balancing. The latter invovles terminating a tcp session and reinitiating one to backend.
评论 #25921110 未加载