简体   繁体   English

AWS 中的内部和外部负载均衡器有什么区别?

[英]What is the difference between the internal and External load balancer in AWS?

What is the difference between the internal and external load balancer?内部和外部负载平衡器有什么区别?

Assume I created an internal load balancer inside a VPC.假设我在 VPC 内创建了一个内部负载均衡器。 Is it possible to access the internal load balancer outside the VPC?是否可以访问 VPC 外部的内部负载均衡器?

Consider I have two AWS accounts A and B. I created an internal load balancer in account A. Is it possible to attach the internal load balancer to Route 53 in account B?假设我有两个 AWS 账户 A 和 B。我在账户 A 中创建了一个内部负载均衡器。是否可以将内部负载均衡器附加到账户 B 中的 Route 53?

An internal load balancer is assigned to a private subnet and does not have a public IP . 内部负载均衡器被分配到一个私有子网并且没有公共 IP It cannot be accessed by a client not on the VPC (even if you create a Route53 record pointing to it).不在 VPC 上的客户端无法访问它(即使您创建了指向它的 Route53 记录)。 If you want clients to be able to connect to your load balancer who are not on the VPC, you need to set up an internet-facing load balancer.如果您希望客户端能够连接到不在 VPC 上的负载均衡器,您需要设置一个面向 Internet 的负载均衡器。

An internal load balancer routes traffic to your EC2 instances in private subnets.内部负载均衡器将流量路由到私有子网中的 EC2 实例。 The clients must have access to the private subnets.客户端必须有权访问私有子网。

The nodes of an Internet-facing load balancer have public IP addresses.面向 Internet 的负载均衡器的节点具有公共 IP 地址。 The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes.面向 Internet 的负载均衡器的 DNS 名称可公开解析为节点的公共 IP 地址。 Therefore, Internet-facing load balancers can route requests from clients over the Internet.因此,面向 Internet 的负载平衡器可以通过 Internet 路由来自客户端的请求。

The nodes of an internal load balancer have only private IP addresses.内部负载均衡器的节点只有私有 IP 地址。 The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes.内部负载均衡器的 DNS 名称可公开解析为节点的私有 IP 地址。 Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.因此,内部负载均衡器只能路由来自有权访问负载均衡器 VPC 的客户端的请求。

It is possible to access the internal load balancer outside the VPC.可以在 VPC 外部访问内部负载均衡器。

You need to have an IP route to the private addresses.您需要有一个到私有地址的 IP 路由。 In your example you might have a VPC-A in AWS account A and VPC-B in AWS account B.在您的示例中,您可能在 AWS 账户 A 中有一个 VPC-A,在 AWS 账户 B 中有一个 VPC-B。

If you connect those 2 VPC for example via AWS VPC Peering (or any other method) and you have proper routing tables configured to route the IP traffic between the two VPCs (or su.nets) then you can access the private ALB in VPC-A from the VPC-B.例如,如果您通过 AWS VPC 对等连接(或任何其他方法)连接这 2 个 VPC,并且您配置了适当的路由表以在两个 VPC(或 su.net)之间路由 IP 流量,那么您可以访问 VPC 中的私有 ALB- A 来自 VPC-B。

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

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