高级HTTP / 2代理,用于分布式抓取解决方案的负载平衡

问题描述 投票:1回答:2

我已经构建了一个分布式HTTP scraper解决方案,它通过设计使用不同的“出口地址”地址,以平衡网络负载。

该解决方案支持IPv4,IPv6和HTTP代理来路由流量。

每个处理器负责定义最有效的路由以平衡流量,并且它是临时实现的,用于原型设计。目前,解决方案随着负载均衡任务的复杂性越来越高而随着处理器数量的增加而增长,这就是我需要一种方法来创建专用于它的组件的原因。

我做了一些相当广泛的研究,但似乎未能找到IPv6,IPv4(数千个本地地址)和公共HTTP代理之间的负载平衡流量的解决方案。该解决方案需要支持权重,应用级响应检查和冷却期。

有谁知道已经解决了这个问题的解决方案?在我开始开发自定义之前。

谢谢你的帮助!

http proxy load-balancing screen-scraping
2个回答
0
投票

如果你搜索load balancing proxy,你会发现Cache Array Routing ProtocolCARP)。这个CARP可能不是你要搜索的,并且存在仅用于代理缓存的服务器,这是迄今为止我从未知道的。 然而,这些服务器也有自己的load balancers,也许这是一个值得搜索更多的细节。

我发现了一个提及CARP作为杰出解决方案的演讲:https://cs.nyu.edu/artg/internet/Spring2004/lectures/lec_8b.pdf

示例:对于Netra Proxy Cache Server中的代理数组:https://docs.oracle.com/cd/E19957-01/805-3512-10/6j3bg665f/index.html

还有几个负载平衡概念(https://link.springer.com/article/10.1023/A:1020943021842):

The three proposed methods can broadly be divided into centralized and decentralized
approaches. The centralized history (CH) method makes use of the transfer rate of each
request to decide which proxy can provide the fastest turnaround time for the next job.
The route transfer pattern (RTP) method learns from the past history to build a virtual
map of traffic flow conditions of the major routes on the Internet at different times of the
day. The map information is then used to predict the best path for a request at a particular time of the day. The two methods require a central executive to collate information
and route requests to proxies. Experimental results show that self-organization can be
achieved (Tsui et al., 2001). The drawback of the centralized approach is that a bottleneck and a single point of failure is created by the central executive. The decentralized
approach—the decentralized history (DH) method—attempts to overcome this problem
by removing the central executive and put a decision maker in every proxy (Kaiser et al.,
2000b) regarding whether it should fetch a requested object or forward the request to another
proxy.

当您使用公共代理服务器时,您可能不会使用decentralized history (DH)centralized history (CH)route transfer pattern (RTP)

也许完全替换你自己的解决方案甚至是有用的,即:https://github.blog/2018-08-08-glb-director-open-source-load-balancer/。我没有理由这个特殊的例子,我发现搜索结果只是随机的。

由于我不使用代理服务器,这篇文章只是一些调查结果,但也许有一个可用的细节。如果没有,请不要介意 - 可能你已经知道了大部分或全部,而且它永远不会为你添加任何新东西。我也从未提及任何具体的解决方案。


0
投票

你检查过这个项目吗? https://Traefik.io支持http / 2和tcp负载均衡。该项目是开源的,可在github上获得。它是使用Go构建的。我现在使用它作为我的反向代理,几乎所有东西都有负载平衡。

我还在docker和Go上写了一篇小博文,展示了Traefik的用法。这也可以帮助您进行搜索。 https://marcofranssen.nl/docker-tips-and-tricks-for-your-go-projects/

在traefik代码库中,您可能会找到答案,或者您可能决定利用traefik来实现您的目标,而不是本土解决方案。

请看这里有关即将到来的Traefik 2.0的TCP支持的一个很好的解释。 https://blog.containo.us/back-to-traefik-2-0-2f9aa17be305

© www.soinside.com 2019 - 2024. All rights reserved.