How Tor Network Bandwidth Is Calculated
The total available bandwidth of the Tor network represents the combined data-carrying capacity of all active volunteer relays. To determine this figure, the network relies on a multi-step process combining self-reported relay measurements, active independent testing by directory authorities, and hourly consensus aggregation. This article explains the exact mechanisms Tor uses to calculate, verify, and publish its total available network capacity.
1. Relay Self-Reporting (Observed Bandwidth)
Each Tor relay continuously monitors its own traffic and calculates an “observed bandwidth” value. This value is determined by measuring the maximum volume of traffic the relay has handled over any 10-second window within the past seven days.
When a relay publishes its server descriptor, it provides three bandwidth figures: * BandwidthRate: The maximum sustained average bandwidth allowed by the operator. * BandwidthBurst: The peak rate allowed for short spikes. * Observed Bandwidth: The actual peak volume observed during operation.
The relay defines its Advertised Bandwidth as the smallest of these three numbers.
2. Verification by Bandwidth Authorities
Because self-reported numbers cannot be entirely trusted in a
decentralized, trustless network, Tor uses specialized directory
authorities running bandwidth measurement scanners (such as
sbws, the Simple Bandwidth Scanner).
These bandwidth authorities continuously build circuits and download test data through each relay. By measuring download speeds under standardized conditions, the authorities generate their own independent bandwidth ratings. This prevents malicious relays from inflating their capacity to attract traffic for surveillance purposes.
3. Consensus Weights
Every hour, the directory authorities aggregate their scanner data and the relays’ self-reported figures to produce a unified document called the Network Consensus.
In the consensus, authorities assign each relay a Consensus Weight, which is a normalized, relative value indicating the relay’s validated capacity compared to the rest of the network. This weight dictates how frequently clients will select that relay when constructing circuits.
4. Aggregation of Total Available Bandwidth
To calculate the total available bandwidth of the entire Tor network at any given moment, Tor Metrics evaluates the latest consensus document and performs the following calculation:
- Identifies all relays assigned the
RunningandValidflags in the consensus. - Retrieves the verified advertised bandwidth for each of these active relays.
- Sums the advertised bandwidths of all active guard, middle, and exit relays.
The resulting sum represents the total available capacity of the network, typically measured and published in gigabits per second (Gbit/s) or megabytes per second (MB/s).