-
Notifications
You must be signed in to change notification settings - Fork 260
add histo metric for IP allocation latency per unique pod #1027
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
Conversation
7d52389 to
38341f8
Compare
cns/restserver/ipam.go
Outdated
| 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()) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
083742e to
b30edbf
Compare
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>
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: