Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

8 free IP addresses in the public subnet specified for AWS Elastic Load Balancer?

From the relevant section of AWS Official Doc, the following requirement is stated:

When you create a load balancer, you must specify one public subnet from at least two Availability Zones. You can specify only one public subnet per Availability Zone.

To ensure that your load balancer can scale properly, verify that each subnet for your load balancer has a CIDR block with at least a /27 bitmask (for example, 10.0.0.0/27) and has at least 8 free IP addresses. Your load balancer uses these IP addresses to establish connections with the targets.

However, I don't understand why -- the bit about requirement 8 free IP addresses. Can someone throw in an explanation? Thanks in advance!

I googled a bit on the Internet and could not find a good explanation. I think understanding this requirement may help me understand how ELB works (I did read the chapter on "How ELB works" but I am still confused)

like image 575
leeyuiwah Avatar asked Mar 07 '19 11:03

leeyuiwah


People also ask

How many IP addresses does an ELB use?

For more information, see Routing traffic to an ELB load balancer in the Amazon Route 53 Developer Guide. The load balancer has one IP address per enabled Availability Zone. These are the addresses of the load balancer nodes.

How can I resolve the AWS glue error the specified subnet does not have enough free addresses to satisfy the request?

Multiple AWS services are using the same subnet. These services might be using many of the subnet's available IP addresses. To resolve the error, use a different subnet with more available IP addresses for the AWS Glue job.

How do I find my free IP on AWS?

Open the Amazon Elastic Compute Cloud (Amazon EC2) console. In the navigation pane, choose Network Interfaces. Click in the search box, and then choose Primary private IPv4 address. If you're looking for a public IP, then choose Public IPv4 address when you click in the search box.


1 Answers

AWS Elastic Load Balancers can scale up and down to meet the traffic demands for your site. The scaling up uses private IP addresses from your subnet. AWS is not very forthcoming with how that works. The best I can find is vague references to it.

load balancers that all feature the high availability, automatic scaling, and robust security necessary to make your applications fault tolerant

The 8 free IP addresses is vaguely addressed below, in general it allows the ELB to scale horizontally.

If subnets in your VPC run out of available IP addresses, AWS resources, such as load balancers, might not respond successfully to increased traffic.

It's a best practice to keep at least eight IP addresses in each subnet available for use. There are two ways to free up or add additional IP addresses for use with load balancers.

FYI, If you try to create an ELB without eight IP addresses free it will fail and you'll get the following error message:

Failure Message

References

  • https://aws.amazon.com/elasticloadbalancing/
  • https://aws.amazon.com/premiumsupport/knowledge-center/subnet-insufficient-ips/
like image 176
kenlukas Avatar answered Sep 28 '22 18:09

kenlukas