简体   繁体   English

Http请求转发以实现Java EE应用程序的弹性负载平衡

[英]Http Request forwarding for elastic load balancing of Java EE application

I am currently investigating possible solutions for flexible load balancing of a streaming application. 我目前正在研究可能的解决方案,以实现流式应用程序的灵活负载平衡。 I will have several nodes running the application that will process and stream content to the users. 我将有几个运行该应用程序的节点,这些节点将处理内容并将其流式传输给用户。 Documents are spread among any number of servers such that a single machine is responsible for serving requests to the set of documents it hosts. 文档分布在任意数量的服务器中,因此,一台机器负责向其托管的文档集提供请求。

Thus, I need some kind of broker that knows on which server the requested document resides and that does a forward to that server. 因此,我需要某种类型的代理,该代理知道请求的文档位于哪台服务器上,并转发到该服务器。 I do NOT want to use some HttpConnection from the broker and then include the response of that http call into the response of the original request (this will obviously be a bottleneck). 我不想使用来自代理的一些HttpConnection ,然后将该http调用的响应包含到原始请求的响应中(这显然是瓶颈)。

So my question is: How can I forward a request to another server after having analyzed the requests data ( POST / GET params, headers or whatever) and determined the destination server? 所以我的问题是:在分析请求数据( POST / GET参数,标头或其他内容)并确定目标服务器之后,如何将请求转发到另一台服务器?

Is there already a good load balancer out there that allows me to use some form of hooks to provide the logic of how to determine destination servers (round robin will obviously not work)? 是否已经有一个好的负载均衡器,可以让我使用某种形式的钩子来提供如何确定目标服务器的逻辑(轮循显然不起作用)?

I want to use Tomcat or something similar to host the streaming application and use only the fundamental servlet stack. 我想使用Tomcat或类似的东西来托管流应用程序,并且仅使用基本servlet堆栈。 Any hints to tools or patterns are appreciated. 对工具或模式的任何提示均表示赞赏。

Thanks 谢谢

一种选择是寻找第7层交换URL负载平衡硬件。

There are several load balancers which has well defined node selection mechanisms based on request parameters like: 有几种负载均衡器具有基于请求参数的定义明确的节点选择机制,例如:

  • headers 标头
  • request uri 要求uri
  • query parameters 查询参数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM