title: Is the fediverse about to get Fryed? (Or, “Why every toot is also a potential denial of service attack”)
url: https://ar.al/2022/11/09/is-the-fediverse-about-to-get-fryed-or-why-every-toot-is-also-a-potential-denial-of-service-attack/
hash_url: a6257c9517a4e07d4d4ccfa872cbf08b

<h1>Is the fediverse about to get Fryed? (Or, “Why every toot is also a potential denial of service attack”)</h1>
<time class="single" datetime="2022-11-09T19:00:00Z">09 Nov 2022</time>
<figure>
<img src="https://ar.al/2022/11/09/stephen-fry-mastodon-banner.png" alt="Screenshot of Stephen Fry’s Mastodon account banner on mastodonapp.uk"> <figcaption>
    <p>Stephen is a big fish to fry. (I’m here all week.)</p>
</figcaption>
</figure>

<p>Warning: the fediverse is about to get Fryed.</p>
<p><a href="https://www.stephenfry.com/">Stephen Fry</a>ed, that is.</p>
<p>Following the recent takeover of Twitter by a proto-fascist billionaire man-baby, people have been fleeing<sup id="fnref:1"></sup> to the fediverse<sup id="fnref:2"></sup>. Among them are folks who, on Twitter, at least, had millions of followers like <a href="https://mastodon.nu/@gretathunberg">Greta Thunberg</a> and, more recently, <a href="https://mastodonapp.uk/@stephenfry">Stephen Fry.</a><sup id="fnref:3"></sup></p>
<p>“Well, surely that’s a good thing? It’ll get everyone talking about the fediverse, decentralisation, and maybe even that <a href="">Small Web</a> thing you keep harping on about all the time, Aral, no?”</p>
<p>Well, yes and no… you see, there is such a thing as <strong>too much of a good thing.</strong> And, on the fediverse today, that appears to be “engagement when you’re popular.” In fact, it could be deadly (to Mastodon instances, that is).</p>
<p>Read on and I’ll try to explain what I mean by using my own account as an example.</p>
<h2 id="how-to-kill-a-mastodon-hint-by-being-chatty-when-youre-popular">How to kill a Mastodon (hint: by being chatty when you’re popular)</h2>
<p>Needless to say, I’m not a celebrity.</p>
<p>And yet, on the fediverse, I find myself in a somewhat unique situation where:</p>
<ol>
<li>
<p><strong>I have my own personal Mastodon instance, just for me.</strong><sup id="fnref:4"></sup></p>
</li>
<li>
<p><strong>I’m followed by quite a number of people.</strong> Over 22,000, to be exact.<sup id="fnref:5"></sup></p>
</li>
<li>
<p><strong>I follow a lot of people and I genuinely enjoy having conversations with them.</strong> (I believe this is what the cool kids call “engagement”.)</p>
</li>
</ol>
<p>Unfortunately, the combination of these three factors creates a perfect storm<sup id="fnref:6"></sup> which means that now, every time I post something that gets lots of engagement, I essentially end up carrying out a <a href="https://en.wikipedia.org/wiki/Denial-of-service_attack">denial of service attack</a> on myself.</p>
<h2 id="mastodon-denial-of-service-as-a-service">Mastodon: denial-of-service as a service?</h2>
<p>Yesterday was my birthday.</p>
<p>So, of course, I posted about it on my Mastodon instance.</p>

<p>It got quite a few replies. And, because it’s only polite, I started replying to everyone with thank-you messages.</p>
<p>Oh, no, you poor, naïve man, you. What were you thinking?!…</p>
<p>I’ll let my friend <a href="https://hugo.gameiro.pt/">Hugo Gameiro</a>, who runs <a href="https://masto.host">masto.host</a> and hosts my instance, explain what happened next:<sup id="fnref:7"></sup></p>
<blockquote>
<p>You just get a lot of engagement and that requires a ton of <a href="https://sidekiq.org/">Sidekiq</a> power to process.</p>
<p>For example, let’s look at your birthday post …  besides requiring thousands of Sidekiq jobs to spread your post through all their servers (you have 23K followers, let’s assume 3K different servers<sup id="fnref:8"></sup>), as soon as you create the post 3K Sidekiq jobs are created. At your current plan you have 12 Sidekiq threads, so to process 3K jobs it will take a while because it can only deal with 12 at a time.</p>
<p>Then, for each reply you receive to that post, 3K jobs are created, so your
followers can see that reply without leaving their server or looking at
your profile. Then you reply to the reply you got, another 3K jobs are
created and so on. </p>
<p>If you replied to the 100 replies you got on that post in 10 minutes (and assuming my 3K servers math is right). You created 300K jobs in Sidekiq. That’s why you get those queues.</p>
</blockquote>
<p>So what does that mean if you’re not into the technical mumbo-jumbo?</p>
<p>It means I was too chatty while being somewhat popular.</p>
<figure>
    <img src="https://ar.al/2022/11/09/sidekiq-stats-during-my-birthday-post.png" alt="Screenshot of my Sidekiq stats, showing 175,082 enqueued tasks as I was replying to folks on my birthday post"> <figcaption>
            <p>What a traffic jam looks like in Mastodon.</p>
        </figcaption>
</figure>

<p>So, what’s the solution?</p>
<p>Well, there’s only one thing you can do when you find yourself in such a pickle: scale up your Mastodon instance.<sup id="fnref:9"></sup> The problem with that? It starts getting expensive.</p>
<p>Prior to the latest Twitter migration<sup id="fnref:10"></sup>, I was paying around €280/year (or a little over €20/month) for my Mastodon instance on a custom plan I had with Hugo from the early days. This week, I upped that to a roughly €50/month plan. And that’s still not enough as my birthday post just showed so Hugo, kindly, has suggested he might have to come up with a custom plan for me.</p>
<p>And yet, the problem is not one that will go away. We can only kick the ball down the road, as it were.</p>
<p>(Unless I piss everyone off with this post, that is.)</p>
<p>Thankfully, by running my own instance, the only person I’m burdening with this additional expense is me. But what if I’d been on a public instance run by someone else instead?</p>
<h2 id="musk-you">Musk you?</h2>

<p>If Elon Musk wanted to destroy <a href="https://mastodon.social">mastodon.social</a>, the flagship Mastodon instance, all he’d have to do is join it.<sup id="fnref:11"></sup></p>
<p>Thank goodness Elon isn’t that smart.</p>
<p>I jest, of course… <a href="https://en.wikipedia.org/wiki/Eugen_Rochko">Eugen</a> would likely ban his account the moment he saw it. But it does illustrate a problem: Elon’s easy to ban. Stephen, not so much. He’s a national treasure for goodness’ sake. One does not simply ban Stephen Fry.</p>
<p>And yet Stephen can similarly (yet unwittingly) cause untold expense to the folks running Mastodon instances just by joining one.<sup id="fnref:12"></sup></p>
<p>The solution, for Stephen at least, is simple: <a href="https://mastodon.ar.al/@aral/109311046067489334">he should run his own personal instance.</a></p>
<p>(Or get someone else to run it for him, like I do.)<sup id="fnref:13"></sup></p>
<p>Running his own instance would also give Stephen one additional benefit: he’d automatically get verified.</p>
<p>After all, if you’re talking to, say, <em>@stephen@social.stephenfry.com</em>, you can be sure it’s really him because you know he owns the domain.</p>
<h2 id="personal-instances-to-the-rescue">Personal instances to the rescue</h2>

<figure>
<p class="videoWrapper">
  
</p>
<figcaption><p>My speech at the European Parliament on the problem with Big Tech and the different approaches provided by Mastodon, the fediverse, and Small Web.</p></figcaption>
</figure>
<p>Wait, I’m confused… didn’t you say that personal instances were part of the problem?</p>
<p>Yes and no: they are and they shouldn’t be.</p>
<p>If ActivityPub (the protocol) and Mastodon (a server that adheres to that protocol) were designed to incentivise decentralisation, having more instances in the network would not be a problem. In fact, it would be the sign of a healthy, decentralised network.</p>
<p>However, ActivityPub and Mastodon are designed the same way Big Tech/Big Web is: to encourage services that host as many “users”<sup id="fnref:14"></sup> as they can.</p>
<p>This design is both complex (which makes it difficult and expensive to self-host) and works beautifully for Big Tech (where things are centralised and scale vertically and where the goal is to get/own/control/exploit as many users as possible).</p>
<p>In Big Tech, the initial cost of obtaining such scale is subsidised by vast amounts of venture capital (rich people investing in exploitative and extractive new businesses – which Silicon Valley calls Startups™ – in an effort to get even richer) and it leads to the amassing of the centres<sup id="fnref:15"></sup> we know today as the Googles, Facebooks, and Twitters of the world.</p>
<p>However, unlike Big Tech, the stated goal of the fediverse is to decentralise things, not centralise them. Yet how likely is it we can achieve the opposite of Big Tech’s goals while adopting its same fundamental design?</p>
<p>When you adopt the design of a thing, you also inherit the success criteria that led to the evolution of that design. If that success criteria does not align with your own goals, you have a problem on your hands.</p>
<p>What I’m trying to say is:</p>
<p><a href="https://mastodon.ar.al/@aral/109274437122830092">Do not adopt the success criteria of Big Tech lest you should become Big Tech.</a></p>
<h2 id="bigger-is-not-better">Bigger is not better</h2>

<p>Today, we equate the size of mastodon.social (the instance run by Eugen) with how successful Mastodon (the software created by Eugen) is. This is very dangerous. The larger mastodon.social gets, the more it will become like Twitter.</p>
<p>I can almost hear you shout, “But Aral, it’s federated! At least there’s no lock-in to mastodon.social!”</p>
<p>This is true.</p>
<p>You know what else is federated? Email.</p>
<p>Have you ever heard of a little old email instance called Gmail? (Or perhaps the term <a href="https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish">“embrace, extend, extinguish?”</a>)</p>
<p>Do you know what happens to your email if Google says (rightly or wrongly) that you’re spam? No one sees your email.</p>
<p>You know what happens if mastodon.social blocks your instance? Hundreds of thousands of people (soon, millions?) do not get a choice in whether they see your posts or not.</p>
<p>What happens when your instance of one blocks mastodon.social? Nothing, really.</p>
<p>That’s quite a power imbalance.</p>
<h2 id="decentralisation-begins-at-decentring-yourself">Decentralisation begins at decentring yourself</h2>
<p>Mastodon is a not-for-profit, and I have no reason to believe that Eugen has anything but the best of intentions.</p>
<p>However, <a href="https://ar.al/2022/02/16/decentralisation-begins-at-decentring-yourself/">decentralisation begins at decentring yourself</a>.</p>
<p>It’s in the interests of the fediverse that mastodon.social sets a good example by limiting its size voluntarily.</p>
<p>In fact, this should be built right into the software. Mastodon instances should be limited from growing beyond a certain size. Instances that are already too large should have ways of encouraging people to migrate to smaller ones.</p>
<p>As a community we should approach large instances as tumours: how do we break them up so they are no longer a threat to the organism?</p>
<p>If you take this approach to its logical conclusion, you will arrive at the concept of the <a href="https://ar.al/2020/08/07/what-is-the-small-web/">Small Web</a>; a web where we each own and control our own place (or places).</p>
<figure>
  <video id="small-is-beautiful" controls="" preload="none" src="https://player.vimeo.com/progressive_redirect/playback/762676594/rendition/1080p/file.mp4?loc=external&amp;signature=6f327f42324b157a97add4fd4c532c69e0cdd29b206ff93f79f4cdae570ed922#t=185" poster="https://small-tech.org/videos/small-is-beautiful-23/poster.jpg">
    <img src="https://small-tech.org/videos/small-is-beautiful-23/poster.jpg" alt="">
    <p>Sorry, your browser doesn't support embedded videos. But that doesn’t mean you can’t watch it! You can <a href="https://player.vimeo.com/progressive_redirect/playback/762676594/rendition/1080p/file.mp4?loc=external&amp;signature=6f327f42324b157a97add4fd4c532c69e0cdd29b206ff93f79f4cdae570ed922#t=27">download
        Small Is Beautiful #23 directly</a>, and watch it with your favourite video player.</p>
  </video>
  <figcaption><p><a href="https://owncast.small-web.org">Small Is Beautiful</a> (Oct, 2022): What is the Small Web and why do we need it?</p>
  </figcaption>
</figure>

<p>I’m not saying that the current fediverse protocols and apps can, will, or even necessarily <em>should</em> evolve into the Small Web.<sup id="fnref:16"></sup> In the here and now, the fediverse is an invaluable stopgap that provides a safer haven than the centralised cesspits of Silicon Valley.</p>
<p>How long the stopgap lasts will depend on how successful we are at resisting centralisation. Protocol and server designs that incentivise vertical scale will not necessarily make this easy. However, there are social pressures we can use to counter their effects.</p>
<p>The last thing you want is a handful of mini Zuckerbergs running the fediverse. Or worse, to find yourself having become one of those mini Zuckerbergs.</p>
<p>I love that the fediverse exists. And I have the utmost respect for the gargantuan effort that’s going into it.</p>
<p>And yet, I am also very concerned<sup id="fnref:17"></sup> that the design decisions that have been made incentivise centralisation, not decentralisation. I implore us to acknowledge this, to mitigate the risks as best we can, to strive to learn from our mistakes, and to do even better going forward.</p>
<p>So to the ActivityPub and Mastodon folks, I say:</p>
<p>Consider me your canary in the coal mine…</p>
<p><strong>«Chirp! Chirp! Chirp!»</strong></p>
