weaveworks / scope

Monitoring, visualisation & management for Docker & Kubernetes
https://www.weave.works/oss/scope/
Apache License 2.0
5.85k stars 709 forks source link

Limit the amount of output a terminal gets sent #3803

Open bboreham opened 4 years ago

bboreham commented 4 years ago

The 'logs' and 'shell' buttons open a terminal; everything the backend can provide is then piped up to that terminal.

Suppose there are 10MB of logs: this will scroll in the terminal as fast as it can and you will be left with the bottom few hundred lines. The first 9.5MB is just a waste. I find it's often hard to get a control-C through the connection while it's scrolling, so the user may end up just closing the window.

I think we could use a rate-limiter to allow up to some reasonable burst through, then drop the bulk. Set a timer so when (if!) it goes quiet we can deliver the last buffer-full.

bboreham commented 4 years ago

As noted in #2908 we could also limit the amount of logs we ask for - both Docker and Kubernetes have a 'tail' option. This feature would still be valid for the 'shell' case.