Recently I decided to install Snowflake proxy to better understand how it works.
After looking at logs, I began to suspect that its work kind of single threaded and it is not using all available resources:
What I see is lots of “sdp offer successfully received” messages, followed by “Timed out waiting for client to open data channel” message.
The problem is that proxy make no new connections until client successfully connects or times out.
Looks like timeout duration is 25s, here is histogram from my logs:
Which means that it is not possible to have more than 144 connections per hour. Is this limit made intentionally? If yes, then why? Why not processing several sdp offers simultaneously?
From logs I see that proxy is almost always reaching this cap:
(line of 12 connections per 5 minutes is clearly seen)
(yellow is sdp offers, blue is connection successes)
I saw explanation about timeouts in different topic:
But it looks like @meskio is wrong: SDP offers are coming from clients, it is not just timeout without clients, it’s a failures.