-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
dash.js client keeps closing current TCP connection and opening new ones #1268
Comments
@ChangSurrey - dash.js does not manage manage or control the TCP connections. Like any other MSE player, it makes XHR requests and the underlying TCP sessions are managed by the browser. These is no javascript API to manage the sessions themselves. For workarounds you could look at joining this thread of interested people looking at parallel requests for each segment https://groups.google.com/forum/#!searchin/dashjs/1676/dashjs/P-KfzJPmueQ/wa80-j5PCAAJ which may help address the problem. Cheers Will |
@wilaw Thank you for the quick reply. I didn't know that the TCP sessions are managed by the browser. Does this mean the TCP behaviour of a DASH session could be different if I use Chrome or Safari? I have looked at the thread in your link. It's an interesting post, but it's different from what I want to do. I just want to keep using one single TCP connection throughout a DASH session (hence the term "persistent"), hence eliminating the need to do TCP slow start every dozens of seconds. |
@wilaw I just found that this issue has been reported at |
@wilaw - I see it is using @ChangSurrey - There are two places where keep alive is configured: the web server and in the browser. The browsers seem to use defaults that are 1-2 minutes, whereas the servers seem to use defaults as low as 5-15 seconds. https://blog.fastmail.com/2011/06/28/http-keep-alive-connection-timeouts/ |
@wilaw @edwardcrichton After configuring my apache 2.4.17 server's keepalive timeout to 30s, all my DASH sessions now use 1 TCP connection for the entire session. |
@wilaw @ChangSurrey That's worth knowing; might be worth adding to the documentation? |
When I use dash.js v2.0.0 to play a video with 5sec segments, I noticed (using Wireshark) that each TCP connection only lasts about 10 or 15 seconds before it is closed by dash.js client and a new one is opened. This causes the client's download data rate to be severely affected by TCP slow start.
If I want to modify dash.js to let it use a persistent TCP connection, which part of the code should I modify? Any pointer would be greatly appreciated, thanks!
The text was updated successfully, but these errors were encountered: