-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add stat for RTTs between client and STUN/TURN server #339
Comments
One can actually get some data on this by looking at the stun and turn candidate gathering time. But having more than two data points (for udp; only one for tcp) is better. |
Should this somehow be reported per STUN server? |
good point... this needs to live on local-candidate then? We might drop the "Stun" in the names then since we have no other RTT. |
Not sure localCandidate is the right place. One STUN server can end up giving you > 1 candidate, I think. |
hrm... for relay candidates the candidate ip should make the localCandidate unique. For STUN you're correct... if you ask two different stun servers you might get the same srflx address from both (depending on the nat type; see this which is in vain). |
My idea was for these fields to go on I hadn't considered the case of multiple STUN servers producing the same server reflexive address. Though this wouldn't be a new problem. So, the spec seems to assume that the implementation will choose one STUN server for each srflx candidate. I know Chrome will just go with the first one that responds. |
I think we have multiple mixups here:
Suggest adding a stunserver object, containing:
That would make it independent of candidates. |
Just to clarify, do you mean a server providing multiple "srflx" addresses for multiple "host" addresses (1:1)? Or for a single "host" address (1:M)? The latter shouldn't happen.
If I understand correctly, this is really more of "stunserverconnection", since you could have multiple objects with the same URL but different local addresses (for different network interfaces, or different m= sections if bundling isn't negotiated). Anyway, that should work; probably cleaner than trying to shove things in |
@lennart-csio PTAL |
We already have
totalRoundTripTime
inRTCIceCandidatePairStats
, androundTripTime
inRTCRemoteInboundRtpStreamStats
, but these are both an end-to-end round trip time.I suggest adding a similar stat to
RTCIceCandidateStats
, which would accumulate round trip times as measured by STUN transactions between client and STUN server (from initial candidate gathering, keepalives for NAT bindings, TURN refreshes, etc.). We've encountered a couple uses for this:So I'd suggest adding something like:
totalStunRoundTripTime
totalStunResponsesReceived
(divide by this to get average RTT)totalStunRequestsSent
(allows you to detect packet loss)Or maybe
totalStunServerRoundTripTime
would be a better name, to make it extra clear that this is between the client and STUN server, and doesn't include connectivity checks.The text was updated successfully, but these errors were encountered: