Replies: 1 comment 2 replies
-
import { setGlobalDispatcher, Agent, request } from 'undici'
setGlobalDispatcher(new Agent({ connections: 42 }))
await request(..) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mcollina
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
We are thinking to use undici as our underline http client, but all of our systems deployed to Azure, and we need to make sure we do not cause snat port exhaustion when doing outbound calls.
Some read up https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-intermittent-outbound-connection-errors
Azure mS propose to use an agent like https://www.npmjs.com/package/agentkeepalive. Which has maxSockets and maxFreeSockets configurations (and timeouts). I was not able to find anything in the undici about this.
Does anyone knows how to do any of those configurations or similar (i am not sure if it is possible to pass agentkeepalive to undici)
Would really appreciate any help !!!
Thank you :)
Beta Was this translation helpful? Give feedback.
All reactions