Skip to main content


What happens when you have your own Mastodon instance (just for you) where over 21,000 people follow you and when you’re following over 4,300 people?

You end up paying ~€50/month for Mastodon hosting 👀

It also opens up interesting questions: what happens when a popular account joins your instance (hint: it will probably cost the instance maintainers quite a bit… I don’t envy the mastodon.nu folks right now).

#fediverse #mastodon
in reply to Aral Balkan

This stuff is never free anywhere but the scale of Big Tech insulates you from it somewhat.

I actually think it’s good to be reminded that our ability to communicate comes with a cost – in terms of resources, environmental impact, etc., not just money.

But, equally, it also makes the case that a system optimised to host hundreds of thousands of people on a single instance is not also somehow magically optimised to host just one person.

The latter is the problem I’m exploring with #SmallWeb.
in reply to Aral Balkan

Big Tech did not insulate us from paying for services, they used our personal data to pay for it. Big Tech also made it so that nobody needed fiber optics because they did all the processing.
in reply to Aral Balkan

So what you are saying is that single user isntances therefore show you the true cost of being popular?

Have you tried being less popular?

:lol_fb:
in reply to Aral Balkan

> But, equally, it also makes the case that a system optimised to host hundreds of thousands of people on a single instance is not also somehow magically optimised to host just one person.

IDK; one of the major backends on the #Fediverse is #Pleroma and its cousins, which despite being more efficient (thus scaling better) than #Mastodon, it's largely used for single-instance users.
in reply to realcaseyrollins ✝️

@realcaseyrollins Yeah, as far as I know, Pleroma is much more tuned for the small instance/single-tenant use cases.

Although, ActivityPub itself, of course, isn’t.
in reply to Aral Balkan

maybe some sort of peering?

It’s possible if all the celebs join one instance the cost will have a plateau, because Justin Bieber and Selena Gomez are followed by people on the same servers.
in reply to Aral Balkan

any indication how frequent @mastohost clears out the media cache? I have the little moon plan and I’m already near 8gb of media. To move up to the next tier isn’t a big deal…but knowing if/when the media cache is cleared out wouldn’t hurt — especially if that will let me not bump up to my limit in a week or two.
in reply to Aral Balkan

so coming to a question; what would be the ideal instance amount/size and ownership structure - is that even a valid question?

Well, we're certainly on a verge of something new.
in reply to Aral Balkan

Great food for thought regarding Fediverse economics. I think it makes for a compelling argument to investigate Mastodon alternatives.

I’m considering starting a Pleroma instance. It seems to be a lighter weight option, and for whatever feature parity it misses with Mastodon, might make up for that fact being compatible with Mastodon client apps. https://pleroma.social/
in reply to Aral Balkan

this probably mainly demonstrate how resource-heavy Mastodon is… I would be curious to know the result in a lighter software such as Pleroma (which is very similar, feature-wise).

And this is an issue for small hosting and big ones too…
in reply to Aral Balkan

Excited to see where you go with this. I'm dubious about the benefit of moving from corporately-controlled platforms to individually-controlled fiefdoms. Full decentralization is what we need, not cyber-HOAs.
in reply to Aral Balkan

You can find much better deals by running your own VPS. I have a 3CPU/2.5GB/40GBSSD/6.5TB-bandwidth-er-month VPS running my instance and it costs me US$24 per *year*. See https://lowendbox.com/blog/2-usd-vps-cheap-vps-under-2-month/
in reply to Aral Balkan

A single user instance may have trouble just getting a patreon from it's users too. 😆

Is it mostly the people following you or the people you are following I wonder? Easier to cut the people you follow I suppose.
in reply to Aral Balkan

interesting! I admit that although I had always worked with the web, I still have this “it just cloud” mentality
in reply to Aral Balkan

I really like the perspective here. It's not all that different than using someone else's file storage/email vs your own. There is always a cost it's either your money or you as the product.
in reply to Aral Balkan

Just here to say that I agree strongly. Would be good if the lie of "free services" would come to an end.
in reply to Aral Balkan

One of my first thoughts was to find out how much my use of the system costs the maintainers, then kick back 7-10x of that to do more than just defray costs. Not everyone is in a position to pay, plus turnover, expansion, and resiliency isn't free but nor is it easily factored into costs. I don't know how a system is sustainable without being up front about its costs and needs.
in reply to Aral Balkan

not sure if you're a good measure for the average person considering you're one of the most-followed people on fedi
in reply to Vale@kujike.nai

@valerauko I’m definitely an edge case but I’m wondering what’s going to happen to certain instances when folks like Greta Thunberg join them (which is what happened to mastodon.nu the other day).

I mean, is it lights out if Stephen Fry ever joins mastodon.social? :)
in reply to Aral Balkan

thought about this some more and i think following a lot of people is more costly than having a lot of followers. so in your case that 4k follows are what add the most to your costs imo. unless greta follows everyone back (or posts once every second) i don't think she'd be much of a problem
in reply to Gareth Kitchen

@gruff I’m mostly like “you better store it, or else!”

(Sorry, I don’t get the question. Apparently I’m using > 20GB of database space – what’s taking all that up, I don’t know – and the masto.host interface shows 0GB of media storage being used, which I’m assuming is a bug.)
in reply to Aral Balkan

I was just trying to get a handle on where the costs were for your plan. Media storage would normally be the killer, I would have thought, if hosting stuff for others. But if it's just 'busy' because of all your users I guess there's lots of network traffic.

I just thought it a lot of money given the costs of a small OVH VPS self host sort of approach which is less than £5 a month (40Gb storage and unlimited traffic).
Unknown parent

Aral Balkan
@karim Good question (cc @hugo). Also, I don’t think I have access to the traffic stats. (My instance is hosted by Hugo at masto.host)
in reply to Aral Balkan

I've been wondering what it looks like to scale a personal server. Particularly as Mastodon has its moment and takes off. With the way federation works for each instance, this really gives me pause about the logic of hosting a personal space, though. Imagine the duplication of content if everyone made a personal space.
in reply to Aral Balkan

That's interesting. I have my own instance with just a few other people on it, and I've been trying to get an understanding of what kind of resources does running Mastodon require.

It seems that it is quite a resource hog. I wonder if something can be done to further optimize the federation.
in reply to Aral Balkan

it feels like a lot of what it must be doing is the same as all the other instances out there are doing, give or take different overlapping sets of data.

That doesn’t feel very efficient, but it also feels like a space where a cooperative caching layer could sit; one that is contributed to by all, without needing to being owned by anyone. Sort of like a CDN in that it’s used if available, but not required for the server to work.
in reply to Aral Balkan

wouldn't it fit on a 4 GB mem, 2 core VPC? I am considering a lightsail instance with 2 GB mem and 1 core VPC since I do not have that much activity. I plan to install without docker, plain mastodon + postgress DB + hardened_malloc + Nginx reverse procy. See pricing https://aws.amazon.com/lightsail/pricing/ which may reduce your montly bill considerably.
in reply to Aral Balkan

For me it look like software demand optimization on absolutely fundamental level. Also - for forseen usage is simply unsuitable and very poor scalable...
in reply to Aral Balkan

I think there is room for improvement... ;) Your queue doesn't look too good...
in reply to Aral Balkan

Thanks for sharing this! It really would be interesting to have the ability to see an approximation of the cost and environmental impact of every post or follow you make depending on the instance. I wonder if that would make us more selective in how we interact with each other?
in reply to Aral Balkan

True, but something like Mastodon does scale in a sense right? As in: you're bound to have follower overlap between users of an instance, so that would mean less load / person?
in reply to Aral Balkan

Eeek! 😱 I need to remember to double what I send to my instance admin next time the abo is due for renewal…
in reply to Aral Balkan

Well, that's daunting! 😅 Note to self: don't get as popular as Aral. 😏
in reply to Aral Balkan

So it's a bit more expensive than having your personal email server 😅
in reply to Aral Balkan

this is really interesting data, I'm also hosting a bunch of my own services and it's interesting to see the cost difference per user on average between them. I'd be interested to see some kind of aggregate cost of mastodon instances over a bunch of different parameters (active users, followers, federated connections...)
in reply to Aral Balkan

that all looks familiar. We're in a separate backchannel with several instance maintainers if you want to discuss scaling tips. DM me if you want the link
in reply to Aral Balkan

one specific tip: create more processes rather than more threads for sidekiq. @joenepraat wrote up what he did (and most scaling instances do): https://github.com/mastodon/mastodon/discussions/19797#discussioncomment-4069704
in reply to Aral Balkan

I think that this sort of problem scales out much better if you are on a shared instance.

The way I understand it, instances share content with each other when needed. So if you are following 4k people, but 3k of those have already been followed by others on your instance, you share that traffic :>

Plus, instance-internal follows are cheap, and you get a more even usage of your resources rather than "mostly nothing until someone very popular posts"
in reply to Aral Balkan

well, you need to increase sidekiq processes and threads. 1 process and 4 threads won't be able to keep up.
in reply to Aral Balkan

@ivarni which is why, instead of being sold to commercial interests, we should chip in on our host of choice….
in reply to Aral Balkan

I think this is the biggest potential problem (very real problem we’re starting to see) with the fediverse in general… a large number of connections grows the federation and communication required exponentially, not linearly. This is difficult enough to deal with in a centralized network, but in a distributed one it becomes an even more complex challenge.

Scaling this thing is going to be fun.
in reply to Aral Balkan

oh boy 😲
that 19 GB is too much, my VPS has only 24 and I'm hosting everything I can on it.

there are only 2 people on my instance currently and I'm mostly following people I knew from Twitter who have migrated recently.
in reply to Aral Balkan

Maybe technology like IPFS could be implemented where only the creator of the message stores the entire entry and other servers in the network store the hash of the message.
in reply to Aral Balkan

These are important questions with huge implications.

With any project it's generally important to start with a clear understanding of what it is that you're trying to accomplish. That allows you to size your effort(s) and resources to achieve goals without derailing a promising effort. It also helps to stay focused on achieving what it is that you set out to do, rather than chasing other arbitrary gains and compromising your mission in the process.
in reply to Aral Balkan

is it the amount of input/output network traffic that raises the costs so much?

On my instance I delete about 1GB a day in unnecessary media attachments that are exchanged, I guess that number is much higher for you?
in reply to Aral Balkan

As a Mastodon newbie, this has occurred to me too. I’d be happy to pay my instance host a few bucks a month to oil the wheels — much better than paying Elon $8 for a blue tick (not that I’d ever do that)!
in reply to Aral Balkan

How do you see how busy your particular server is?
in reply to Aral Balkan

Not to mean any disrespect but 21K is a very normal sized celeb account on Twitter. I wonder what Pleroma under similar load would look like.
in reply to Aral Balkan

This is probably a question more appropriate for @Gargron and/or @cwebber probably, but I wonder if there would be a way to reduce the bandwidth and CPU usage? Is this a protocol issue or an implementation issue?
in reply to Aral Balkan

Not to mean any disrespect but 21K is a very normal sized celeb account on Twitter. I wonder what Pleroma under similar load would look like. I saw that social.kernel.org chose Pleroma instead of Mastodon.
in reply to Aral Balkan

Not knowing anything about the back end of a mastodon server and how it scales, what's the impact on server load when you go from, say, 20k followers to 200k to 2M?

As the fediverse scales up, are we looking at a world where it's fair to ask the users with the biggest followers to shoulder more of the hosting costs?
in reply to Aral Balkan

that’s kind of steep pricing to be honest…
in reply to Aral Balkan

From my understanding is it would increase your database usage mostly. Bandwidth would spike too I suppose depending on how much talk you get from the servers.

What type of hosting are you using?

As an instance operator, I decided to offload objects to S3/Cloudfront and Email to SES (mostly to avoid dealing with emails getting flagged as spam).
in reply to Aral Balkan

RSS 19.6GB! I've been watching this value on my server as we hit RAM limits recently. The docs say, "Typically a Sidekiq process will start at some relatively small value and reach some steady state value where RAM usage remains flat. If your RSS never stops growing, that can indicate you have a memory leak somewhere!" I wonder, did yours slowly grow to almost 20GB?
in reply to Aral Balkan

makes me wonder how things will be when *lots* of big names start moving over. Wonder how long until some networks start putting out ads?
in reply to Aral Balkan

you pay for mastodon? Doubt us newbies will do that. Not the Aussies anyway.
in reply to Aral Balkan

my instance with ~40 people is pushing about a 1/4 yours is. I’m hosting on a dedicated box from Hetzner and so it’s quite affordable (16core/64GB RAM) and only currently seeing 20% memory usage and 4% processor usage averaged over 24 hours.
in reply to Aral Balkan

wow, feel less bad about the sidekiq queue on our server now!
in reply to Aral Balkan

Some historical perspective: back in 1998 I had a popular personal website that got 100,000 visitors a month, mostly static content, and it cost me several hundred dollars/month (plus hardware costs in the tens of thousands) to host (I ended up getting a full rack/10megabit feed with about 7 4U servers and then 2 Sun 1U's). The fact that this is even possible now for €50/month is a massive improvement.
in reply to Aral Balkan

this is what I was curious about and figured might be an issue. Being concerned about this has already earned me some scalding in the network.

On a personal level I'm wondering what I could feasibly do at home and possibly tunnel through Cloudflare.

On a large scale, I see issues
in reply to Aral Balkan

Sorry for the offtopic, which browser is used for the sidekiq screenshot, looks interesting?
in reply to Aral Balkan

I wasn't aware of that Sidekiq dashboard URL, thanks for the tip! My single user self-hosted instance has gone from around 2,500 daily jobs processed to almost 9,000 in the past 2 weeks! My Raspberry Pi 4 seems to be keeping up alright so far, but definitely something to keep an eye on.
in reply to Aral Balkan

I wonder, when hosting an instance becomes something for the people who can afford it, what that will mean for the diversity on the platform(s) long term.
in reply to Aral Balkan

It's very Mastodon-y that this popular account is a White Elephant: "A possession that its owner cannot dispose of, and whose cost, particularly that of maintenance, is out of proportion to its usefulness." https://en.wikipedia.org/wiki/White_elephant
in reply to Aral Balkan

thanks for sharing. thought of having self-hosted mastodon before I saw this. every cent I spent matters
in reply to Aral Balkan

what are the specs of your instance and which provider do you use? I only started a couple of days ago with a 2 cores, 8GB of RAM of cloud server from #hetzner that costs around 12€/mo (plus Wasabi $5.99/mo for the media storage)
in reply to Aral Balkan

I have no idea why but the idea that self-hosting mastodon for one person would ever cost that much a month is insane to me.
It is crazy to think about how many resources we use for everyday activities
in reply to Aral Balkan

wowwww that’s a lot. I didn’t think it would use so much but I suppose it makes sense!
in reply to Aral Balkan

OVH and Hetzner offer very affordable baremetal servers with unlimited bandwidth, so you would pay much less for much more power. Vultr has some too, but they aren't cheap. IONOS has some, but network is sometimes unreliable. So far, OVH and Hetzner ate the way to go if you want to scale up.
in reply to Aral Balkan

: what’s so special about mastodon.nu? Missing the reference here.
in reply to Aral Balkan

Thanks a bunch for posting this. I was wondering how the single-user instance scaling would work out.

I've been wondering about the single-user vs multi-user instance question from a performance standpoint ever since I read your arguments for smaller instances.

I seems I will have to read the ActivityPub spec at some point.
in reply to Aral Balkan

I've worked with musicians and large companies who I could imagine would just want to pony up for a "VIP instance" to ensure they can still reach their audience—but does that even exist as a turnkey service? (It reminds me of setting up client websites in the 90s, where you just had to know someone with a mostly-reliable server rack and hope things worked out!)
in reply to Aral Balkan

If 21K people follow you, odds are you can monetise that to an extent. (And I have the feeling most people who would attract that kind of following wouldn't be averse to monetisation.)
in reply to Aral Balkan

What disk usage are we talking about here?

Really curious. Self-hosting my single-user instance and the space usage is not trivial.

Had I known I would've gone with #Pleroma probably.
in reply to Aral Balkan

Are these numbers for real? This looks like there is quite some potential for performance optimisation.
in reply to Aral Balkan

I guess popular peeps like you will have to monetize their popularity to pay for their instances :) or... someone can create a paid instance for celebs and other very popular peeps.
in reply to Aral Balkan

@aral, thanks, good to know! I think much of the cloud hosting costs are artificially inflated, and it's easier to control the costs with self-hosted hardware anyhow.
in reply to Aral Balkan

this probably means that if someone becomes big on our instance, we either need to beef up or graduate them to their own instance uh
in reply to Aral Balkan

I will cross that bridge when the next 20,999 people start following me.
in reply to Aral Balkan

But then how can this scale? I was thinking of having my own instance, but if it costs that much to host for me just to follow others and have them follow me, it doesn't seem like it's worth it. I don't try and monetize my social media really.
in reply to Aral Balkan

would you be willing to share the changes over time? I have mixed feelings between thinking it should be more vs less than €50/mo based on my experience with hosting.

Super cool that you can do something like this
in reply to Aral Balkan

For one hot nanosecond, I wondered about hosting my own instance, then looked into the details and very quickly NOPED out.
in reply to Aral Balkan

Couldn't you have this running on your residential Internet connection? Server under the desk, domain, dynamic DNS?

What's the big deal about having 20,000 followers? If you're the only user on your own node and you Toot to 20,000 followers, doesn't it work similarly to a multi-cast, sending only a tiny amount of traffic to the peer nodes? Surely your node doesn't sit there looping from 0 to 19999, sending a separate toot to every follower.
in reply to Aral Balkan

yes, but also - options. £50 for a self-managed social media / owned community space sounds like a good deal.
in reply to Aral Balkan

Interestingly... with my tiny-stance with hardly any followers or followings... i am just an order of magnitude below your stats.
in reply to Aral Balkan

That is why, when I joined my server, I set up a Patreon payment to help keep the server ticking over.

I'm enjoying the lack of ads and am happy to pay for this.

Throw a few sheckles to your local admin. They will appreciate it.
in reply to Aral Balkan

The expense/work is more about how many instances you are pushing to, right? Now that you are connected to lots of instances, your instance presumably wouldn’t notice a hundred+ people with fewer followers. (I think?)
in reply to Aral Balkan

It looks to me that this is a case where server built with #rust , like #Mitra ( https://codeberg.org/silverpill/mitra ) could save a day
in reply to Aral Balkan

I've been thinking of setting up my own instance, but would definitely only do it on a server with fixed rate and unlimited traffic 😄
in reply to Aral Balkan

Can I follow you with my alts to help make it worse?
in reply to Aral Balkan

I would really love to see an activitypub server oriented towards low resource consumption
in reply to Aral Balkan

Is that actually a good idea? Intuitively I think creating an instance just for me would be a heavier burdon on the network than just joining an existing instance?
in reply to Aral Balkan

I have my own, but I'm quite confident that I will never have that problem :)
in reply to Aral Balkan

Sure, #Mastodon is growing very popular but it is by far one of the the less efficient and optimized #Fediverse softwares… it is written in #Ruby, whose benckmarks score very low.

If only it was written in #Go
in reply to Aral Balkan

Yes, running single-user instances of Mastodon is resource-intensive.

I don't think hosting costs scale with followers though. My single-person instance with 1500 accounts has tripled its followers in a week and it's comfortably within the resources available to it with 25 €/month of expenses. Load has barely changed.
https://respublicae.eu/@praetor/109295906060181251

Moderation and other #MastoAdmin costs however scale with the number of eyeballs, I suppose.
in reply to Nemo_bis 🌈

@nemobis To me the most urgent question is that of (useless) storage consumption. Having started my instance-of-one a little over a week ago and I already collected 10 GB out of the 20 GB @mastohost is providing in his baseplan. It‘s nuts. How do you guys handle that? I thought having 20 GB of storage for myself should work just fine - at least for a longer period of time and not only for two weeks. Or do I miss out on something? Thanks.
in reply to Aral Balkan

I think @fiftyfourpark is referring to Media storage. You are probably referring to 20 GB is Database storage. Media is on your end (remember?) and I am pretty sure you are over 20 GB :)
@nemobis
in reply to Aral Balkan

@fiftyfourpark @nemobis @mastohost I hear that the Mastodon 4 release will let you control how long you cache the remote media. I guess reducing that will help. The client could do the caching
in reply to Aral Balkan

scaling problems with Mastodon are why Twitter was successful in the first place. They dealt with this headache so we didn’t have to.

We’ll see in the long run if a new equilibrium can be struck, or if centralized providers are the only feasible market option for scale.
in reply to Aral Balkan

Don't even start to think about energy consumption. At @BUNDjugend_ak_digi we where asking around if somebody got into comparing different software like Pleroma vs. Mastodon to see which one would be more sustainable but I guess somebody still has to do the proper research for that and we didn't have the capacity to do it, unfortunately.
in reply to Aral Balkan

Thank you for the awesome detailed article. Is there a place to see performance statistics for numbers of followers on the instance and outside as well as number of people on the instance. What is the optimum numbers for performance purposes? Any data available? Thanks.
in reply to Aral Balkan

this protocol seems to have to be optimized.
It is unsustainable and unscalable.
I am a developer, in order to survive it should become more P2P like the old emule so everyone share the running costa on his own device
in reply to Aral Balkan

I considered Synapse to be less effective than Mastoson, but given that Synapse handles about 60 chat rooms and is federated to more than 500 servers, while only using 25 to 50% of the single core of my VPS and about 2GiB of memory, maybe it is more efficient. And it have strong consistency as well as E2E encryptions.