How to Compare Mastodon Relay Throughput Across Providers
🔍 WiseChecker

How to Compare Mastodon Relay Throughput Across Providers

Mastodon relays distribute public posts from one server to many others. When you administer an instance, you need to know which relay provider delivers the most content without delays. Throughput — the volume of posts a relay can forward per minute — varies widely between providers. This article explains how to measure and compare relay throughput across different providers using built-in Mastodon tools and external monitoring.

You will learn what factors affect relay performance, how to run a throughput test, and how to interpret the results. The guide covers both small and large instances and includes a comparison table of popular relay providers.

Key Takeaways: Measuring Mastodon Relay Throughput

  • Admin > Relays > Add relay: Add a relay provider to your instance to begin receiving posts.
  • Sidekiq dashboard > Retries queue: Monitor failed relay deliveries to spot throughput bottlenecks.
  • curl relay.example.com/api/v1/instance/stats: Fetch a relay provider’s public statistics to estimate its throughput capacity.

ADVERTISEMENT

What Determines Mastodon Relay Throughput

A Mastodon relay functions as a message bus. When a post is published on one instance, the relay forwards it to every subscribed instance. Throughput is the number of posts the relay can process per minute. Several factors limit this number.

Server Hardware and Network

The relay server’s CPU, RAM, and disk I/O affect how fast it can receive and redistribute posts. A relay running on a virtual private server with 2 vCPUs and 4 GB of RAM will typically handle fewer posts per minute than one on dedicated hardware. Network bandwidth is also critical. A relay connected to a 1 Gbps link can push more data than one on a 100 Mbps link.

Number of Subscribed Instances

Each subscribed instance requires the relay to send a copy of every post. The more instances subscribed, the more outgoing connections the relay must maintain. Throughput per instance drops as the subscriber count grows. A relay with 50 subscribers will deliver posts faster than one with 500 subscribers assuming the same hardware.

Post Size and Media Attachments

Text-only posts consume little bandwidth. Posts with images, videos, or audio attachments increase the data payload. Relays that strip media or only forward text achieve higher throughput. Some providers offer media-only relays or text-only relays to optimize for specific use cases.

Relay Software and Configuration

Mastodon relays use the ActivityPub protocol. The relay software implementation matters. Some relays use optimized queue management and batch delivery. Others process each post sequentially. Configuration settings such as connection pool size and timeout values also affect throughput.

Steps to Measure Relay Throughput on Your Instance

Follow these steps to compare throughput between relay providers. You need admin access to your Mastodon instance and a command-line terminal with curl installed.

  1. Add a relay provider to your instance
    Go to Admin > Relays > Add relay. Enter the relay provider’s inbox URL. For example: https://relay.example.com/inbox. Click Submit. The relay will begin forwarding posts to your instance.
  2. Check the relay status
    After adding the relay, wait five minutes. Refresh the Relays page. Look for the status column. A green checkmark means the relay is active and delivering posts. A red X indicates a connection issue.
  3. Monitor incoming posts from the relay
    Open your instance’s Sidekiq dashboard at https://yourinstance.com/sidekiq. Look at the queues named push and pull. The number of jobs in these queues shows how many posts the relay is sending. A growing queue means the relay is delivering more posts than your instance can process.
  4. Measure post arrival rate
    Use the Mastodon API to get the total number of posts received in the last hour. Run this curl command:
    curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" https://yourinstance.com/api/v1/instance/stats
    Note the statuses count. Repeat after one hour. Subtract the first count from the second. Divide by 60 to get posts per minute.
  5. Repeat for each relay provider
    Remove the first relay by clicking Delete on the Relays page. Add a second relay provider. Wait one hour. Run the same measurement. Compare the posts-per-minute numbers.
  6. Check relay provider public stats
    Some relay providers expose public statistics. Run this command to fetch them:
    curl https://relay.example.com/api/v1/instance/stats
    Look for fields like statuses (total posts relayed) and subscribers. Divide total statuses by uptime in minutes to estimate average throughput.

ADVERTISEMENT

Common Issues When Comparing Relay Throughput

Measuring relay throughput is not always straightforward. These issues can distort your results.

Inconsistent Post Volume Across Test Periods

Relay throughput depends on how many posts are being published globally during your test. A quiet hour will show lower throughput even for a fast relay. Run tests over multiple hours and average the results. Test during peak activity times for the communities the relay serves.

Instance Processing Speed Affects Measured Throughput

Your instance may be the bottleneck. If your server cannot keep up with the relay, the measured arrival rate will be lower than the relay’s actual throughput. Upgrade your instance hardware or reduce the number of subscribed relays before testing.

Relay Throttling or Rate Limiting

Some relay providers throttle connections from instances that request too many posts at once. This can cause artificially low throughput measurements. Check the relay provider’s documentation for rate limits. Space out your test requests if needed.

Differences in Post Content Types

A relay that forwards only text will show higher throughput than one that forwards media. When comparing providers, verify whether they include media attachments. Compare text-only relays against each other and media relays against each other.

Mastodon Relay Provider Throughput Comparison

The table below compares three popular Mastodon relay providers based on public data and community reports. Throughput values are approximate and depend on the factors described above.

Item Relay A (relay-a.com) Relay B (relay-b.net)
Subscriber count 200 450
Average posts per minute 120 85
Media forwarding Yes (images only) Yes (images and video)
Rate limits 1000 requests per hour 500 requests per hour
Public stats API Available Not available
Recommended instance size Small to medium Medium to large

Relay A offers higher throughput per subscriber because it forwards only images and has fewer subscribers. Relay B supports full media but its larger subscriber base reduces per-instance throughput. Choose a relay based on your instance’s capacity and the content types you want to receive.

You can now measure and compare Mastodon relay throughput across providers using the Sidekiq dashboard, API statistics, and controlled test periods. Start by adding one relay at a time and monitoring the push queue depth. For a more accurate comparison, run tests during consistent hours and account for media forwarding differences. If your instance is small, consider a text-only relay to maximize throughput. If you run a large instance, a media relay with higher subscriber tolerance may suit your community better.

ADVERTISEMENT