Traffic
Every server has a traffic allowance for the current period. VirtFusion counts the server's public network usage against it, and can throttle the server and email its owner as the allowance runs out.
Allowances
A server's allowance is set in gigabytes on its network settings, and 0 means unlimited. A new server takes
the allowance from the package it is created with, so the package is where most allowances are set in
practice.
Traffic Blocks grant a server extra traffic for one period only. They are added on the server's network settings, count towards the same allowance, and are shown in the usage alert and throttle emails. A block cannot extend an allowance that is already unlimited.
Servers assigned to a resource pack operate under the pack's allowance instead of their own.
How traffic is measured
Traffic is measured in decimal units: 1 GB is 1,000,000,000 bytes, which is how bandwidth is billed and how carriers report it.
Before 7.1 a gigabyte was 1,073,741,824 bytes. Existing allowances keep the number they were given, so the same allowance is now reached about 7% sooner in terms of bytes transferred. Usage figures, percentages and alert emails all moved with it, so they agree with each other and with your carrier and billing figures. Adjust allowances if you intend clients to transfer the same number of bytes as before.
Choosing the unit
Under Settings > Virtualization > Server Traffic Management, Traffic Unit sets which definition your installation uses:
| Decimal | 1 GB is 1,000,000,000 bytes. The default, and how carriers, transit contracts and billing systems count bandwidth. |
| Binary | 1 GB is 1,073,741,824 bytes. For plans and billing written against the older definition. |
The setting applies to every server at once and nothing is rewritten: an allowance keeps the number it was given, and only the number of bytes that number permits changes. So a 1000 GB allowance permits 1,000,000,000,000 bytes in decimal and 1,073,741,824,000 in binary, about 7.4% more.
Historical usage is stored as raw byte counters, so past months are shown in whichever unit is selected now. A month that reads 107.37 GB in decimal reads 100 GB in binary.
Every allowance then permits about 6.9% fewer bytes. A server whose usage sits between the two limits will be over its allowance at the next traffic check and will be throttled or stopped according to your traffic limit action. The panel asks you to confirm this direction for that reason.
Switching the other way only releases servers: the next check attempts to remove the action, and retries on a later check if the hypervisor does not respond. A server that was powered off is not started again.
Integrations can read the definition in effect rather than assuming it: the server traffic endpoint
returns trafficBytesPerGb, and a server's traffic object carries bytesPerGb.
The traffic policy
Four settings decide what happens as a server uses its allowance.
| Setting | What it does |
|---|---|
| Traffic Accounting | Which direction counts towards the allowance: Inbound & Outbound, Inbound Only or Outbound Only. |
| Traffic Limit Action | What happens when the allowance is reached: None or Throttle Network. |
| Throttle Speeds | The inbound and outbound speeds in kB/s applied while the server is over its allowance. |
| Usage Alerts | Two thresholds at which the server's owner is emailed. The first is 50%, 60%, 70% or 80%, the second 85%, 90% or 95%. Either can be disabled. |
Where each setting comes from
The policy can be set at three levels, and each of the four settings inherits on its own:
- The server, under its network settings.
- The hypervisor the server runs on.
- The virtualization settings, which apply to the whole installation.
For each setting, VirtFusion uses the first level that has a value: the server's own, otherwise the hypervisor's, otherwise the global one. A server that sets only its throttle speeds still takes its accounting direction and alert thresholds from the hypervisor or the global settings.
Packages carry the same settings, but a package is a template rather than a level. Its values are copied onto a server when the server is created, and changing a package afterwards does not change servers that already exist.
When a server reaches its allowance
With Throttle Network, the server's primary interface is slowed to the throttle speeds. The throttle is removed when the server is no longer over its allowance, which happens when the period resets, when a traffic block is added, or when the allowance is raised or set to unlimited. The owner is emailed when the throttle is applied and again when it is removed.
With None, nothing is enforced. Usage is still counted and shown, but the server is never throttled and no usage alerts are sent.
Usage alerts
At each threshold that is set, the server's owner is emailed that usage has reached that percentage of the allowance. The email reports the full allowance including any traffic blocks, the usage so far, and when the current period ends.
Alerts are only sent for servers whose traffic limit action resolves to Throttle Network and whose allowance is not unlimited. A server with the action set to None sends no alerts even when both thresholds are set.