statusboard
statusboard copied to clipboard
feat(agent): introduce new, consolidated http agent
Summary
Historically npm has had 3-4 different http agents; consolidating on a single one allows us to optimize perf in one place & add new capabilities
Exit Criteria
- [x] create new
@npmcli/agentlibrary - [x] remove legacy agents & refactor code paths to use
@npmcli/agent - [ ] add new configs for fine-grained timeouts (ex. time-to-first-byte, total transfer time, idel-time etc.) & bubble them up to the CLI
- [ ] document new configs
This is blocked while we figure out a feature flag approach for things like this.
what is the priority, can this wait?
not extremely high priority, but it is a significant fix for any of our users that leverage a proxy. the current http agents we use for proxies do not support socket limiting, so it's fairly common for the folks who use them to end up seeing connection reset errors and extremely long response times since we're sending a lot of http requests without concurrency limits
ok, do we know high level effort needed to complete this?
i've opened issues for the remaining work to be done to the agent itself in its own repo https://github.com/npm/agent/issues
the config work is not represented in an issue yet, i'll open one for designing feature flags
We have lots of issues due to ECONNRESET while using a internal proxy and setting fetch-retries and fetch-factor doesn't help as seems like it doesn't retry on ECONNRESET. I hope this might help und it would be awesome if it would not be far down the road.
it has dependency on experimantal flag - https://github.com/npm/statusboard/issues/631
This is complete except for the fine grained configs which will be a followup task here.