Skip to content

Addressing CNI IP consumption and Warm Pool IP availability calculations #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devanshpoplii
Copy link
Contributor

@devanshpoplii devanshpoplii commented Mar 27, 2025

I am skeptical of the previous statement made in the documentation where the CNI consumption of IP addresses is said to be 49.

In total, CNI should be taking up 50 IP addresses for nodes + pods. (20 + 20 + 10)

Now, the previous statement mentioned that it will use 49 IP addresses in warm pool which seemed wrong. (Warm = unused)

That being said, I have added my calculations in the document as well to make it easier.

For Node 1 and Node 2 (identical configuration):

2 ENIs × 10 IPs per ENI = 20 IPs total
Subtract 2 primary IPs (1 per ENI) = 18 IPs
Subtract 1 IP for CoreDNS pod = 17 IPs available
So each of these nodes has 17 IPs in warm pool

For Node 3:

1 ENI × 10 IPs = 10 IPs total
Subtract 1 primary IP = 9 IPs available in warm pool

Total warm pool calculation:

17 (Node 1) + 17 (Node 2) + 9 (Node 3) = 43 IPs

Primary IPs from each ENI would not be considered under warm pool. CoreDNS takes up 1 IP each for 2 pods.
Node 3 doesn't have coreDNS and has one primary IP on primary ENI, so it's left with 9 IPs available for the pods.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

I am skeptical of the previous statement made in the documentation where the CNI consumption of IP addresses is said to be 49.

In total, CNI should be taking up 50 IP addresses for nodes + pods.

Now, the previous statement mentioned that it will use 49 IP addresses in warm pool which seemed wrong. (Warm = unused)

That being said, I have added my calculations in the document as well to make it easier.
Primary IPs from each ENI would not be considered under warm pool.
CoreDNS takes up 1 IP each for 2 pods. 
Node 3 doesn't have coreDNS and has one primary IP on primary ENI, so it's left with 9 IPs available for the pods.
@devanshpoplii devanshpoplii requested a review from a team as a code owner March 27, 2025 20:33
As an example, on a cluster with 3 c5.large nodes (3 ENIs and max 10 IPs per ENI), when the cluster starts up and has 2 CoreDNS pods, the CNI will consume 49 IP addresses and keeps them in warm pool. The warm pool enables faster Pod launches when the application is deployed.
As an example, on a cluster with 3 c5.large nodes (3 ENIs and max 10 IPs per ENI), when the cluster starts up and has 2 CoreDNS pods, the CNI will consume 50 IP addresses and keep 43 IPs in warm pool. The warm pool enables faster Pod launches when the application is deployed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought there was a reason this was 49 and not 50?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the logic and explanation in the whole documentation, 49 seems to be incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants