About a Mastodon Post

What one post says about the Fediverse

A few months ago, I posted something to Mastodon that a lot of users interacted with.

Post by @onmywalk@vmst.io
View on Mastodon

Far from viral, but it's definitely the most popular thing I've managed to post since I began using Mastodon. To be clear, the popularity of the post isn't the point of this article. For a while now, I've wondered one simple question: how many Mastodon or Fediverse instances are represented in those user interactions? I finally sat down and answered that question this past weekend. But before I get into that, let me catch you up on Mastodon and the Fediverse in case you're unaware.

Mastodon & the Fediverse, in my words...

Mastodon is a Twitter-like micro-blogging application. It's one of the many applications that make up the Fediverse. All Fediverse applications implement ActivityPub, an open, standard protocol. ActivityPub allows the users of all Fediverse applications to interact with each other even if they aren't the same application. For example, on PixelFed (an Instagram-like application in the Fediverse) I can follow users on Mastodon. And on Mastodon, I can follow users on PixelFed. Imagine if you could follow Instagram users on Twitter. The Fediverse is that, today.

One last but important detail: anyone can run a Mastodon instance! There isn't just one. I signed up for my account on vmst.io, but you may choose mastodon.social, or one of the many other Mastodon instances out there. No matter which one you choose, I can follow you and you can follow me. This is true because Mastodon (and the Fediverse altogether) is decentralized. No billionaire can buy the Fediverse social network and bend it to their wishes.

Back to the article

So yeah, I was after an answer to my question - how many Fediverse instances were represented in the reactions to my post? I visited my post with Firefox's Web Developer Tools open. I observed the APIs called to determine how I might be able to answer my question. It wasn't hard to discover the following two APIs.


# Obtains metadata for accounts that boosted the post:
/api/v1/statuses/<status id>/reblogged_by

# Obtains metadata for accounts that favorited the post:
/api/v1/statuses/<status id>/favourited_by

Calling these APIs and paginating through their results would get me info about each account that interacted with my post. But most importantly, that info would include the instance domain where each user was registered. If I could distill that down to the unique list of instances, I'd get the answer to my question!

So I got busy whipping up a little bit of JavaScript. I called the APIs above, parsed the information I needed, and outputted a readable summary of what I wanted to know. Here's that code on the off chance anyone actually wants to see it.

https://github.com/joeymink/toot-deets/blob/main/index.js

Enough tech talk! Here is the output of that script when run againt my post at the time of this article's writing:


Found 918 boosts!
Number of instances that boosted: 297
Found 1407 favs!
Number of instances that favorited: 411
Total unique users that interacted: 1879
Total unique instances that interacted: 489

To say nothing of the number of users in the Fediverse that saw my post, 1,879 unique accounts favorited or boosted it. But here's what I was after: those users existed across 489 instances. That's 489 different deployments of Mastodon! These 489 instances are owned and managed by different people across the world. Together, they make a social network that truly is a network. And this is just the small slice of the Fediverse that my post garnered reactions from. The Fediverse is so much bigger!

I'm an active Mastodon user, but I'm no expert. I bet the information I'm sharing here is not noteworthy to Mastodon admins and developers. But I'm enamored by the achievements of the Fediverse admins and developers. Countless independently-owned and operated social media servers joined by their ability to interoperate and communicate with each other. Real distribution and real decentralization in action. Honestly? It's f*cking beautiful.