necrosato / home-alert

IOT Home Security System
0 stars 0 forks source link

Reverse proxy performance #74

Closed necrosato closed 3 years ago

necrosato commented 5 years ago

I'm curious to know the performance implications of using the reverse proxy server on a single node layout. Need to put some thought into how we want to test this.

necrosato commented 5 years ago

This does seem to be an issue for me. When running in a single node configuration I am noticing significant performance differences when streaming without using the reverse proxy via

http://node:5000/stream

and streaming through the reverse proxy via

http://node/location/stream

Performance is fine when using the first method but greatly drops when going through the reverse proxy. Frames begin to lag in time, with the lag time increasing the longer I view the stream.

margielamadman commented 5 years ago

By single node, you mean the Pi running as both the controller and node roles?

necrosato commented 5 years ago

@margielamadman yes one pie. I since installed a second node on a more powerful Linux laptop using it as the control server as well. There are issues when streaming from the same node as the control server is running on.

necrosato commented 5 years ago

@margielamadman Okay some more info. The python process which runs the home alert software starts to use over 100% cpu when trying to use the reverse proxy server on a single node setup. I just saw this monitoring the output of top on the node. Seems like there's some bad business going on with the home alert python code, not the reverse proxy server.

necrosato commented 3 years ago

Fixed via #82 . One of the changes I made was the streaming playback method. Now we use FFmpeg encoded hls streams which seem to fix this issue.