I’m going to provide some in app useful information about the user connectivity status. At the same time I need to store some structured stats logs in the server side for reporting and analyzing purposes. Here’re some question came in my mind:
Does client stats differ from the stats by server? Which one to use for the client?
Server stats are generated by mediasoup as stated in the documentation. Client side stats are those generated by the PeerConnection. mediasoup-client does not modify them at all.
Taking this into account, can you rephrase your other questions by specifying whether you mean server or client stats in each of them?
Particularly for a specific producer or consumer, do client and server stats share the same result (meaningfully and not necessarily equal in their values)? And if yes is there any advantages using server stats rather client stats for client reporting?
I’m not sure, probably both. Please you enlighten me.
Does client stats differ from the stats by server? Which one to use for the client?
No preference. Use whichever suits better your needs. In the server you have the server stats, in the client you have the client stats. Or you can retrieve the server stats in the client, etc. No preference.
Particularly for a specific producer or consumer, do client and server stats share the same result (meaningfully and not necessarily equal in their values)? And if yes is there any advantages using server stats rather client stats for client reporting?
They are supposed to provide similar values in matching fields, yes. Of course, “out” direction in client becomes “in” direction in server and vice-versa.
hey mkh, I found it useful to use the server stats, and send those over to the client for displaying information due to the fact that mediasoup is calculating the server side so they’re consistent.
If you use the client side stats, those are calculated by the client’s browser and you’ll have to handle the fact that not all browsers report the same information.
I don’t remember the specifics in the report but one thing I was trying to do was get the bitrate and frame rate on the client side, and firefox made that really easy as it included both fields but on chrome I had to manually calculate the bit rate I believe.
I figured out that there is no availableIncomingBitrate in the stats generated by mediasoap. Am I missing some thing? If not then why it’s been documented?
I was hoping I had it also for producer but it seems I don’t.
Lag or latency is one of the common issues in network connectivity but it seems roundTripTime has no role in calculating the score.
Hi @swoobie
Good point I just have performance concerns about getting stats for hundreds or thousands of streams in the server.
I figured out that there is no availableIncomingBitrate in the stats generated by mediasoap. Am I missing some thing? If not then why it’s been documented?
There is availableIncomingBitrate and availableOutgoingBitrate. Anyway we do not document all those fields. They mean the same as in the spec.
Can roundTripTime be interpreted as latency?
I was hoping I had it also for producer but it seems I don’t.
Okay I can see availableIncomingBitrate only in the producer transport stats but not in the consumer transport, and there is no availableOutgoingBitrate neither in the producer transport nor in the consumer transport: