Mastodon Relay Bandwidth Consumption: How to Estimate
🔍 WiseChecker

Mastodon Relay Bandwidth Consumption: How to Estimate

Mastodon relays forward public posts from one instance to many others. This feature helps small instances discover content without manually following many remote users. However, relays can consume significant bandwidth, especially when an instance subscribes to multiple relays or runs on limited hosting. This article explains how relays use bandwidth and provides a method to estimate your monthly consumption before the bill arrives.

Key Takeaways: Estimating Relay Bandwidth on Mastodon

  • Administration > Relays > Add relay: Use this menu to subscribe to a relay and see its current status.
  • Administration > Dashboard > Sidekiq stats: Check the number of incoming activities per hour to gauge relay load.
  • Average post size of 1–5 KB: Multiply this by daily relay activity to estimate monthly bandwidth in gigabytes.

ADVERTISEMENT

Why Relays Drive Up Bandwidth Usage

A relay acts as a redistribution hub. When a post is published on any instance connected to the relay, the relay sends a copy of that post to every other subscribed instance. The more instances a relay serves, the more copies it pushes. For your instance, every relayed post arrives as a separate HTTPS request containing the post object, media attachments, and sometimes boost and favorite activities.

Bandwidth consumption depends on three factors: the relay’s total activity volume, the number of relays you subscribe to, and the average size of each relayed message. A small personal instance that subscribes to one relay with moderate traffic might use 10–20 GB per month. A medium instance with three busy relays can exceed 100 GB per month. If your hosting plan caps bandwidth at 100 GB, a single relay can push you over the limit.

What Exactly Consumes Bandwidth

Each relayed activity includes the post text, user profile data, and any attached media. Media files — images, videos, and audio — are the largest component. A post with a 500 KB image consumes roughly 500 KB of bandwidth when relayed. A post with a 2 MB video consumes 2 MB. Relays do not resample or compress media; they forward the original file. Text-only posts are small, usually 1–5 KB. Boost and favorite activities are even smaller, around 0.5–1 KB each.

How to Estimate Your Instance Relay Bandwidth

Estimating requires two pieces of data: the number of relayed activities your instance receives per hour and the average size of those activities. You can collect both from the Mastodon admin interface without installing extra tools.

  1. Log into Mastodon as an admin
    Open your instance URL and sign in with an account that has the Administrator role.
  2. Navigate to Administration > Dashboard
    This page shows the current server status, including Sidekiq queue statistics.
  3. Locate the Sidekiq stats section
    Look for “Incoming activities per hour” or a similar metric. This number represents the total activities — posts, boosts, favorites — arriving from all relays and direct federation. Write down this number. For a more accurate estimate, check it at different times of day and calculate the average.
  4. Determine the relay share of total activity
    If your instance has few direct followers but subscribes to two relays, most incoming activity comes from relays. A rough method: subtract the number of activities you would expect from direct federation. If you have 50 local users and each follows 100 remote accounts, direct activity is low. In that case, assume 80–90% of incoming activity is relay traffic. For a precise count, check the relay logs in Administration > Relays. Each relay shows its current status and a rough activity indicator.
  5. Estimate average activity size
    Use these typical sizes: text-only post = 3 KB, post with one image = 500 KB, post with video = 2 MB, boost or favorite = 1 KB. On most instances, about 30% of relayed posts contain media. Calculate the weighted average: (0.7 × 3 KB) + (0.3 × 500 KB) = 152 KB per activity. This is a conservative estimate. If your instance receives many video posts, use a higher media ratio.
  6. Calculate monthly bandwidth
    Multiply the relay activities per hour by the average size, then multiply by 720 hours per month. Example: 500 relay activities per hour × 152 KB = 76,000 KB per hour. 76,000 KB per hour × 720 hours = 54,720,000 KB. Divide by 1,048,576 to convert to gigabytes: 52 GB per month. This is the bandwidth consumed by relay traffic alone.

Refining the Estimate with Sidekiq Queues

For a more detailed breakdown, check the Sidekiq queue named “relay” or “relay_incoming” if your instance runs a custom configuration. The number of jobs in this queue multiplied by the average job size gives a direct relay bandwidth figure. Most default Mastodon installations do not separate relay queues, so the method above is the standard approach.

ADVERTISEMENT

Common Estimation Mistakes and What to Watch For

Relay Activity Spikes During Breaking News

A relay that normally forwards 200 activities per hour can spike to 2,000 per hour during a major event. Your estimate based on average traffic will undercount bandwidth during these spikes. If your hosting plan has a hard bandwidth cap, consider the worst case: multiply your average hourly activity by 5 to account for peak days.

Ignoring Relay Redundancy

If two relays serve the same large instance, your instance may receive duplicate posts. Each duplicate consumes bandwidth. Check your relay list in Administration > Relays. If you see two relays that both list the same popular instance, consider unsubscribing from one. This can cut bandwidth by 20–40% without reducing content variety.

Misjudging Media Size

Mastodon instances can set a maximum media attachment size, typically 8 MB for images and 40 MB for videos. Posts with large media files consume proportionally more bandwidth. If your relay subscribes to instances that allow large uploads, your estimate should use a higher average size. Check the media size limit of the relay’s connected instances by visiting their about page. If the limit is 16 MB for images, assume a higher media average, such as 800 KB per image post.

Relay Bandwidth Estimation: Single Relay vs Multiple Relays

Item Single Relay Three Relays
Activities per hour 400 1,200
Average activity size 152 KB 152 KB
Monthly bandwidth estimate 42 GB 126 GB
Risk of exceeding 100 GB cap Low High

The table assumes a 30% media ratio and 720 hours per month. Actual results vary based on relay activity and media content. To reduce bandwidth, remove relays that duplicate content or serve instances you do not care about.

You can now estimate your Mastodon relay bandwidth using the admin dashboard activity rate and an average activity size of 152 KB. For a more accurate figure, track incoming activities over a week and adjust the media ratio based on your instance’s typical content. If bandwidth exceeds your hosting plan limit, consider subscribing to fewer relays or choosing relays that serve only text posts. An advanced approach is to set up a local relay that filters media before forwarding, but that requires additional server software.

ADVERTISEMENT