You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most Node.js services heavy in HTTP calls to same destination benefit a lot of having keepAlive on by default, e.g. we had to do it passing agent when using node-fetch:
You shouldn’t need to pass the agent in. Node.js Core batches concurrent requests together to optimize for keep-alive. The browser does the same.
You’d only need to manage your own agent if you wanted to hold the connection between requests instead of having them closed out when there’s less load.
We also need to keep the connection alive between the requests. So we probably need to invest the effort to migrate to another library instead of bent :-(
Most Node.js services heavy in HTTP calls to same destination benefit a lot of having
keepAlive
on by default, e.g. we had to do it passingagent
when usingnode-fetch
:https://github.com/nearprotocol/nearlib/blob/master/src.ts/utils/web.ts#L24
Is there any way to enable
keepAlive
when usingbent
? Also wonder if there is any good reason to not use it by default.The text was updated successfully, but these errors were encountered: