Skip to content

New proxy side ports are opened for each websocket opened by a client #719

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

Open
rgbkrk opened this issue Oct 23, 2014 · 2 comments
Open

Comments

@rgbkrk
Copy link

rgbkrk commented Oct 23, 2014

Sockets are ballooning within the node proxy when handling the websockets. A port gets allocated for each one between node and the proxy targets.

Every 2.0s: sudo lsof -i | grep node                                                                                                                      Thu Oct 23 22:58:28 2014

sudo: unable to resolve host dev
node    3924 nobody   10u  IPv4 117123      0t0  TCP *:8000 (LISTEN)
node    3924 nobody   11u  IPv4 117124      0t0  TCP ip6-localhost:8001 (LISTEN)
node    3924 nobody   12u  IPv4 117125      0t0  TCP ip6-localhost:8001->ip6-localhost:59783 (ESTABLISHED)
node    3924 nobody   13u  IPv4 185713      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56590 (ESTABLISHED)
node    3924 nobody   14u  IPv4 184626      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56577 (ESTABLISHED)
node    3924 nobody   15u  IPv4 184628      0t0  TCP ip6-localhost:40600->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   16u  IPv4 182588      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56578 (ESTABLISHED)
node    3924 nobody   17u  IPv4 182590      0t0  TCP ip6-localhost:40607->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   18u  IPv4 186387      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56579 (ESTABLISHED)
node    3924 nobody   19u  IPv4 186389      0t0  TCP ip6-localhost:40611->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   20u  IPv4 185715      0t0  TCP ip6-localhost:40636->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   21u  IPv4 175024      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56591 (ESTABLISHED)
node    3924 nobody   22u  IPv4 175026      0t0  TCP ip6-localhost:40642->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   23u  IPv4 151837      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56592 (ESTABLISHED)
node    3924 nobody   24u  IPv4 151839      0t0  TCP ip6-localhost:40648->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   25u  IPv4 184792      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56602 (ESTABLISHED)
node    3924 nobody   26u  IPv4 184794      0t0  TCP ip6-localhost:40672->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   27u  IPv4 173469      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56603 (ESTABLISHED)
node    3924 nobody   28u  IPv4 173471      0t0  TCP ip6-localhost:40678->ip6-localhost:49155 (ESTABLISHED)
node    3924 nobody   29u  IPv4 184813      0t0  TCP 23.253.157.134:8000->83-244-151-247.cust-83.exponential-e.net:56604 (ESTABLISHED)
node    3924 nobody   30u  IPv4 184815      0t0  TCP ip6-localhost:40683->ip6-localhost:49155 (ESTABLISHED)

Ref: jupyterhub/configurable-http-proxy#18
Ref: jupyter/tmpnb#73

@Rush
Copy link
Contributor

Rush commented Oct 23, 2014

That's how web sockets work, they retain connection for as long as they're active.

@rgbkrk
Copy link
Author

rgbkrk commented Oct 24, 2014

That's how web sockets work, they retain connection for as long as they're active.

This is certainly true, but does one client really need a new port for each connection between the proxy and the proxy target?

@rgbkrk rgbkrk changed the title New ports are opened for each websocket opened by a client New proxy side ports are opened for each websocket opened by a client Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants