-
In #1304 we discussed the issue where HTTP/2.0 connections do not get closed until the browser window is closed, even when the page is reloaded. The result is that OME will hold many connections even if it is only using one of them, and the viewer statistics will be inaccurate. I know we cannot change HTTP/2.0, but maybe it's possible to solve the problem with another approach... Would it be possible to add a "Timeout" configuration value to the LLHLS publisher? The purpose of the timeout would be to observe if no data has flowed to that session in the last X seconds, then the session would be destroyed. This would in theory keep the viewer count accurate. I hope you can consider adding this because the inaccurate viewer count is a security concern for users of LLHLS 🥹 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
I think my explanation was misrepresented. OvenMediaEngine will of course close the connection after 30 seconds if no data is flowing on the TCP connection. It is not true that you said that OME holds many connections. The fact that there are multiple sessions is just a statistical number, and there is only one actual TCP connection. In detail, it is as follows. As shown in the figure, the HTTP/2 browser uses only one connection in the entire PC when connecting to one server. In other words, even if you run 3 browsers on your PC and play 3 videos with OvenPlayer, only one TCP connection is connected to OME. This makes it difficult for OvenMediaEngine to calculate "concurrent viewers". There may be several strategies.
Let's assume the following. Can OvenMediaEngine recognize that two players are closed at this time? This is very difficult. Because it is related to the HLS protocol. There is no state called "end" in the HLS protocol. Because the client just downloads the chunklist and segments. Two players are closed, but one player is still downloading chunks. So OvenMediaEngine doesn't know that both players are closed. So I put an algorithm that determines that all three sessions related to it are closed when the connection is disconnected or when no data flows through the connection. Please let me know if you have any better algorithm ideas for calculating statistics. |
Beta Was this translation helpful? Give feedback.
I think my explanation was misrepresented. OvenMediaEngine will of course close the connection after 30 seconds if no data is flowing on the TCP connection. It is not true that you said that OME holds many connections. The fact that there are multiple sessions is just a statistical number, and there is only one actual TCP connection.
In detail, it is as follows.
As shown in the figure, the HTTP/2 browser uses only one connection in the entire PC when connecting to one server.
In other words, even if you run 3 browsers on your PC and play 3 videos with OvenPlayer, only one TCP connection is connected to OME.
This makes it difficult for OvenMediaEngine to calculate "concurrent viewers".
Th…