Skip to content
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

feat(agent): introduce new, consolidated http agent #584

Closed
2 of 4 tasks
darcyclarke opened this issue Oct 17, 2022 · 8 comments
Closed
2 of 4 tasks

feat(agent): introduce new, consolidated http agent #584

darcyclarke opened this issue Oct 17, 2022 · 8 comments
Assignees
Labels

Comments

@darcyclarke
Copy link
Contributor

darcyclarke commented Oct 17, 2022

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

  • create new @npmcli/agent library
  • 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
@darcyclarke darcyclarke modified the milestone: v9.0.0 Oct 17, 2022
@wraithgar
Copy link
Member

This is blocked while we figure out a feature flag approach for things like this.

@saquibkhan
Copy link

what is the priority, can this wait?

@nlf
Copy link

nlf commented Jan 3, 2023

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

@saquibkhan
Copy link

ok, do we know high level effort needed to complete this?

@nlf
Copy link

nlf commented Jan 3, 2023

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

@burka
Copy link

burka commented Jan 5, 2023

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.

@saquibkhan
Copy link

it has dependency on experimantal flag - #631

@lukekarrys
Copy link
Contributor

This is complete except for the fine grained configs which will be a followup task here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants