Skip to content

Http Clients Pools Handling #2773

Answered by metcoder95
shalevamit9 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that approach is correct and the only way to sort that out for the moment. If the DNS changes and the IP comes with it, undici will just fail because the connection might be dropped or not available anymore. Then a new reconnect will be necessary.

As you suggest, you can lower the keepAliveMaxTimeout to reduce the life of the connection and drop it faster (https://undici.nodejs.org/#/docs/api/Client?id=parameter-clientoptions), if you want to have a faster cycle to minimize this possibility.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shalevamit9
Comment options

@metcoder95
Comment options

Answer selected by shalevamit9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants