Open SilinPavel opened 1 month ago
Lets implement the next approach:
New API method POST /run/{id}/network/limit?boundary=<int>
boundary
param: NETWORK_LIMIT: <boundary>
Scheduled daemon on the API that will perform actual limiting
AbstractSchedulingManager
)NETWORK_LIMIT: <boundary>
, daemon should execute DockerContainerOperationManager
which then will execute ssh command on a target node to actually limit bandwidthNETWORK_LIMIT_<SystemPreferences.SYSTEM_RUN_TAG_DATE_SUFFIX>: <timestamp>
to give a hint that limitation was actually performed and whenNETWORK_LIMIT: <boundary>
anymore, daemon should disable limitation alsoScript to limit bandwidth on a node
commit
, get_container_size
, etc. scripts
Background Let's introduce mechanism of the monitoring, notification and (if possible) regulation of usage of network by pods.
This mechanism should be similar to the one we have for
IDLE RUN
monitoring. Network usage data can be obtained fromheapster elk
Realization of the monitoring could be done in the following way:
System Preferences
to be able to configure behaviour (system.pod.bandwidth.limit, system.pod.bandwidth.action, system.pod.bandwidth.action.backoff.period)HIGH_CONSUMED_NETWORK_BANDWIDTH
idle run
monitoingsystem.pod.bandwidth.limit
== 0, skip checksystem.pod.bandwidth.limit
for configured period of time + put a label on the runsystem.pod.bandwidth.action.backoff.period
consumption still in place - perform an action