weaveworks / scope

Monitoring, visualisation & management for Docker & Kubernetes

Home Page:https://www.weave.works/oss/scope/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit the amount of output a terminal gets sent

bboreham opened this issue · comments

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.

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.