Skip to content

Commit

Permalink
Introduce a minimum target for ENI IPs (aws#612)
Browse files Browse the repository at this point in the history
* Introduce a minimum target for ENI IPs

Adds a MINIMUM_IP_TARGET environment variable to inform the AWS CNI that a
particular number of total IPs is anticipated for use with a particular node.
This is useful to ensure a sufficient supply of IPs on a node up-front without
the 2x IP usage overhead of setting WARM_IP_TARGET to the same value.

* Fix multiple incorrect references to MINIMUM_IP_TARGET

Co-Authored-By: Ed Morley <501702+edmorley@users.noreply.github.com>
  • Loading branch information
2 people authored and Claes Mogren committed Apr 20, 2020
1 parent e4f56df commit 3a1b838
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,24 @@ EC2 API and that might cause throttling of the requests. It is strongly suggeste
If both `WARM_IP_TARGET` and `MINIMUM_IP_TARGET` are set, `ipamD` will attempt to meet both constraints.
This environment variable overrides `WARM_ENI_TARGET` behavior.

`MINIMUM_IP_TARGET`
Type: Integer
Default: None

Specifies the number of total IP addresses that the `ipamD` daemon should attempt to allocate for pod assignment on the node.
`MINIMUM_IP_TARGET` behaves identically to `WARM_IP_TARGET` except that instead of setting a target number of free IP
addresses to keep available at all times, it sets a target number for a floor on how many total IP addresses are allocated.

`MINIMUM_IP_TARGET` is for pre-scaling, `WARM_IP_TARGET` is for dynamic scaling. For example, suppose a cluster has an
expected pod density of approximately 30 pods per node. If `WARM_IP_TARGET` is set to 30 to ensure there are enough IPs
allocated up front by the CNI, then 30 pods are deployed to the node, the CNI will allocate an additional 30 IPs, for
a total of 60, accelerating IP exhaustion in the relevant subnets. If instead `MINIMUM_IP_TARGET` is set to 30 and
`WARM_IP_TARGET` to 2, after the 30 pods are deployed the CNI would allocate an additional 2 IPs. This still provides
elasticity, but uses roughly half as many IPs as using WARM_IP_TARGET alone (32 IPs vs 60 IPs).

This also improves reliability of the EKS cluster by reducing the number of calls necessary to allocate or deallocate
private IPs, which may be throttled, especially at scaling-related times.

---

`MINIMUM_IP_TARGET` (Since v1.6.0)
Expand Down

0 comments on commit 3a1b838

Please sign in to comment.