What is Bandwidth?
Bandwidth refers to the amount of data transferred between your server and the internet. This includes both inbound (uploads, API requests) and outbound (web pages served, downloads, API responses) traffic.
How Bandwidth is Measured
- Monthly transfer — total data in/out during a billing period, measured in TB
- Port speed — the maximum rate of data transfer (e.g., 1 Gbps)
What Uses Bandwidth
- Web page loads (HTML, CSS, JS, images)
- API requests and responses
- File downloads
- Email sending and receiving
- Backup transfers to remote storage
- Software updates (apt, yum)
Monitoring Your Usage
# Real-time bandwidth
nload
iftop
# Monthly totals with vnstat
sudo apt install -y vnstat
vnstat -m # Monthly summary
vnstat -d # Daily summaryReducing Bandwidth Usage
- Enable Gzip/Brotli compression on your web server
- Use a CDN for static assets
- Optimize and compress images
- Set proper cache headers so returning visitors don't re-download assets
- Use HTTP/2 or HTTP/3 for multiplexed connections