Limit Bandwidth to Container
Some containers need their bandwidth limited to reduce the risk of them flooding our limit upload speed. Examples of this are
File storage / sharing
Websites
File conversion / editing software
Network Adaptor
Firstly, you will need to get primary network adaptors name, which (if different from mine - ens18) will need to be set as a variable.
SSH into your server
Run a command that lists network interfaces, such as
ip link show
Review the output and locate your primary adaptor. You may have a stack of adaptors for your docker containers.
If your network adaptor is named differently than mine, you have 2 options
Set
NETADAPT
variable to the network interface nameUpdate
ens18
in the section below to your network interface name
Compose File
To limit an application's bandwidth you will need to add the Traffic Control container and a network to your compose file. This container manages anything going through the docker network and applies the label limit
Applying label to application
In addition to the above, you will need to set the application to use the newly created network and add labels for its configuration,
Last updated