[Proposal] Allow configuring request timeout per plugin instead of using a single global timeout
Maintainers usually reply within 6 days
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go
- Domain
- backend-api-design
Research direction
Start with pkg/adaptation/plugin.go around the global request timeout referenced in the issue, then trace how plugin requests and timeout configuration are handled. Define how a per-plugin value, an upper bound, and the global fallback should work, and confirm the behavior with the relevant existing tests or request-handling entry points.
Written by the indexing model from the issue text.
Description
Today, NRI uses a single global request timeout for all plugins https://github.com/containerd/nri/blob/bc2f8191ef9994f20c864510266a966a8868a69e/pkg/adaptation/plugin.go#L93
This works well when all plugins have similar latency characteristics, but it becomes limiting when one plugin legitimately needs a longer timeout while the rest should keep a shorter and stricter one.
In our use case, we never hit the 2-second default timeout, but there is the risk that a slow run could hit it in production, causing the plugin to be detached. We would prefer to run with more margin (e.g., 5/10 seconds). We could force users to change the containerd config to raise the timeout for all the plugins, but it seems a little bit invasive.
It would be nice to let the plugin specify its own timeout (maybe checking it is below a reasonable upper bound (60/120sec)) so that users have a solution out of the box without changing the global config.
Would it make sense to support a per-plugin request timeout, with the current global timeout kept as the default/fallback?
If this sounds acceptable, I’d be happy to help further refine the proposal.
This is slightly related to https://github.com/containerd/nri/issues/114, but it doesn't propose the same thing
[!NOTE]
For our use case, bumping the default timeout to 5/10s could be a solution as well, but it would be nice to find a generic solution for everyone
- Dominant language
- Go
- Stars
- 419
- Forks
- 105
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 14
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from containerd/nri
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
containerd/nri#363 · 8 comments ·
Maintainers usually reply within 6 days
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
containerd/nri#353 · 15 comments ·
Maintainers usually reply within 6 days
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
containerd/nri#282 · 19 comments ·
Maintainers usually reply within 6 days
-
v1.0 required
Difficulty 5/5 Over a week Newbie friendliness 35/100
containerd/nri#273 · 2 comments ·
Maintainers usually reply within 6 days
-
Provide basic runtime metrics for NRI pluginsPossibly taken @mikebrow claimed this 33 days ago. Openv1.0 required
Difficulty 5/5 Over a week Newbie friendliness 25/100
containerd/nri#272 · 1 comment ·
Maintainers usually reply within 6 days
Similar issues
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jordansmall/spindrift#7895 ·
Maintainers usually reply within 1 day
-
documentation priority: medium skill: intermediate status: ready for dev
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
hyperledger-labs/fabric-smart-client#2830 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
P3 tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day