-
[OFFTOPIC] I know this is not directly related to uWebsockets, but I was reading your article and it mentions the need to have multiple IP addresses to run the experiment: for i in {135..185}; do sudo ip addr add 192.168.0.$i/24 dev wlp3s0; done I'm wondering how to do this same thing in a public VPS, where you only have 1 public IP address. In other words, what is the best way to avoid running out of ports in a public server? (Btw, I'm running my uWebsocket server behind a Nginx proxy in the same machine.) Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
One IP adress can only have 65k connections, that's a hard theoretical limit since ports are represented as 16 bit unsigned integers. You literally have to severe using multiple IP addresses. |
Beta Was this translation helpful? Give feedback.
-
Ok. The thing is that when I run the command
And since a TCP connection is defined as these 4 tuples, I don't see where I'm running out of ports. Since my server is only using the port 443. |
Beta Was this translation helpful? Give feedback.
-
Hmm I think I mixed them up myself... Right, the client needs multiple IP addresses, not the server. My bad, I think? |
Beta Was this translation helpful? Give feedback.
-
I'm confused. Honestly I have no idea right now ;) |
Beta Was this translation helpful? Give feedback.
-
Ah. Either you need multiple IP addresses server side, or you need to connect from multiple IP addresses client side. You can't have one IP server side and one IP client side and expect to go beyond 65k or even close to that |
Beta Was this translation helpful? Give feedback.
-
Ah gotcha, it makes sense now. Thanks :) |
Beta Was this translation helpful? Give feedback.
Ah.
Either you need multiple IP addresses server side, or you need to connect from multiple IP addresses client side. You can't have one IP server side and one IP client side and expect to go beyond 65k or even close to that