简体   繁体   English

AWS通过Load Balancer分发HTTP请求

[英]AWS Distribute HTTP request with Load Balancer

Using AWS, I want to: 使用AWS,我想:

  • Distribute http request sending over several different IP s 分配通过几个不同IP发送的http request
  • Send this requests without using proxy 发送此请求而不使用代理
  • Send this using Elastic Load Balancer and AutoScaling Group 使用Elastic Load BalancerAutoScaling Group发送此消息
  • Send these requests from one instance to several instances in AutoScaling Group 将这些请求从一个实例发送到AutoScaling Group多个实例
  • Each of those several instances assigns different IP to the incoming request so output the request in its IP 这几个实例中的每一个都为传入的请求分配不同的IP,因此在其IP中输出请求

How do I do this? 我该怎么做呢? Is there anyway to set up load balancer just to send through http request ? 无论如何,有没有设置负载均衡器只是为了通过http request I want each http request to have different IP address. 我希望每个http请求都具有不同的IP地址。

So, basically you're willing to connect to EC2 instances behind a ELB and willing to know, on the EC2 instances, the original IP address of the connection, not the ELB's IP address. 因此,基本上,您愿意连接到ELB后面的EC2实例, 愿意在EC2实例上知道连接的原始IP地址,而不是ELB的IP地址。

If my understanding of your question is correct, then the answer is 如果我对您的问题的理解是正确的,那么答案是

  • Use TCP listener on the ELB, instead of HTTP listeners. 在ELB上使用TCP侦听器,而不是HTTP侦听器。
  • Enable Proxy Protocol on the ELB 在ELB上启用代理协议
  • on your EC2 instances, collect the original IP address 在您的EC2实例上,收集原始IP地址

Full step by step and demo application is available on AWS' blog . 可在AWS的博客上获得完整的分步演示应用程序。

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

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