Skip to content

Conversation

@rbtr
Copy link
Collaborator

@rbtr rbtr commented Sep 20, 2021

Signed-off-by: Evan Baker rbtr@users.noreply.github.com

Reason for Change:

Adds a data structure and metric for keeping track of IP allocation requests per pod and recording the total time taken to return an IP for that pod.

Issue Fixed:

Requirements:

Notes:

@rbtr rbtr added the cns Related to CNS. label Sep 20, 2021
@rbtr rbtr requested a review from neaggarwMS September 20, 2021 23:37
podInfo, returnCode, message := service.validateIPConfigRequest(req)

// remove this pod from the waiting for IP allocation set, if it is present
_ = service.podsPendingIPAllocation.Pop(podInfo.Key())
Copy link
Member

Choose a reason for hiding this comment

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

Actually with data deleting during release wont give us complete data. AFAIK, ContainerD calls ADD and if ADD fails to provision then it calls DEL followed by another ADD. If that is true, then we will never be able to truely evaluate the actual time it took to allocate an IP

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated the PR to use a custom queue-style structure for this:

  • We will hold up to the last 250 (maxpods) unique pod IDs that we have seen, recording the timestamp that that pod was first seen.
  • When an IP is allocated, we will pop the entry for that pod and record the duration since it was first seen.
  • When the queue is full and we see a new pod, we will drop the oldest pod record by first-seen-timestamp and record the new pod.

@rbtr rbtr force-pushed the ip-alloc-latency branch 2 times, most recently from 083742e to b30edbf Compare October 4, 2021 22:14
rbtr added 5 commits October 5, 2021 18:51
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
…allocation

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
@rbtr rbtr force-pushed the ip-alloc-latency branch from b30edbf to 1c564de Compare October 5, 2021 23:51
@rbtr rbtr merged commit 060a4d8 into Azure:master Oct 7, 2021
@rbtr rbtr deleted the ip-alloc-latency branch October 7, 2021 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cns Related to CNS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants