Closed mStirner closed 4 months ago
Guess max connection will be applicable only to http connections and once the connection is upgraded to websockets it will no longer be effective
and once the connection is upgraded to websockets it will no longer be effective
And how does the underlaying http module signal/notify that to the agent?
The spec details this quite extensively at https://datatracker.ietf.org/doc/html/rfc6455 As for implementation, folks at https://github.com/websockets/ws can probably better articulate
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
I try to understand the anatomy of a http request/live cycle better. I think for most of the developers this is not necessary, but i want to go down the rabbit hole.
When i have a custom http agent create, and set
maxSockets=1
&keepAlive=true
, how does the agent handle this situation? In my minimal reproducable example, for each Websocket connection a new tcp socket is created, event whenmaxSockets
set to 1.Where/how does the agent knew he has to create a new connection because the first one is still needed? I would expect that
maxSockets
tell the agent, "no matter what, you only create one tcp socket". In combination with WebSockets this seems dumb, and i wonder even more how this is handled by the agent.Node.js version
v16.20.0
Example code
client.js
server.js
Operating system
Ubuntu 18.04.6 LTS
Scope
no clue
Module and version
Not applicable.