[Proposal] Allow configuring request timeout per plugin instead of using a single global timeout

Open
#287 7 comments 7 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

@CoderSherlock is already working on this.

Since Aug 6, 2026.

  • #304 by @CoderSherlock — open

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containerd/nri

All issues in containerd/nri

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.