Open adamantivm opened 9 years ago
A few notes while testing today:
My conclusion is that either the bandwidth or the processing speed in Heroku is not enough to process the video and that causes an increasing delay over time. It would be nice to implement some sort of mechanism to drop frames if they take longer to send to the server than to receive them.
It is important to distinguish if the delay happens from proxy client to proxy server or from proxy server to web browser.
It is also important to distinguish if the problem is bandwidth or processing speed, since different solutions could be implemented depending on this.
More information: I think the main issue with this approach is that, when a video connection is open, the proxy client starts receiving data from the web_video_server and calls "connection.write_message()" for each chunk received from the video server. If the data is too much, Tornado in the proxy client takes too long to send each of those messages and they start getting queued for output. After a while, the proxy client has a huge list of messages to be sent which get older and older and older.
Check if there are delays in the delivery of video when using the proxy server (particularly on Heroku) and think how to improve it