Apply bandwidth limit
Rationale
Bandwidth limits is a must have for an MFT solution and one of the requirements that is most asked for. It is a valuable asset, for marketing, commercially and for operations.
Requirements
Two limits should be considered : inbound and outbound bandwidth.
The bandwidth limitations should be applied at several levels :
- Globally, for the whole service;
- At the client (outbound) or server (inbound) level;
- At the partner (outbound) level;
- At the agent (inbound for remotes or outbound for local) level.
If no limit is given for all elements of a level, it is considered not restrained for this level.
Except for the global level, it should be possible to define limits as absolute values (ex: 100 Mbps
) or as relative value (ex: 40%
). if a limit is relative, it is resolved as a part of the above level. If the above level is unrestrained, it is unrestrained too.
When, for a given level, a limit is only given to some elements only, the limit of these elements is set to the limit of the level above, minus all of the limit set at the same level.
Whether the limits are defined as "bytes per second" or "bits per second" is left to the implementation, but it must be consistent.
Limit resolution for a transfer
Each transfer has a limit applied. It is resolved by taking the minimum of each above levels.
Examples of limits resolution :
A client is defined with a limit of 100 kbps. It has 3 partners defined, where only the first one has a limit of 60 kbps. the limit of the two other partners is set to 100 kbps - 60 kbps = 40 kbps
(i.e. they share the remaining bandwidth).
A transfer is received by a server with a limit of 20 Mbps from an agent with a limit set to 150 Mbps. The global limit is 10 Mbps. The limit resolved for this transfer is min(global, server, agent) = min(10, 20, 150) = 10 Mbps
.
A transfer is received by a server with a limit of 60% from an agent with a limit set to 20%. The global limit is 100 Mbps. The limit resolved for the transfer is global * server * agent = 100 * 0,6 * 0,2 = 12 Mbps
.