m2.nz/content/posts/mastodon_influx.md

56 lines
4.2 KiB
Markdown
Raw Permalink Normal View History

2022-05-08 06:40:02 +00:00
---
2022-05-09 06:50:34 +00:00
title: "Mastodon.nz and the recent twitter influx"
2022-05-08 06:40:02 +00:00
tags: ["mastodon", "twitter", "self hosting"]
2022-05-09 06:19:49 +00:00
date: "2022-05-09"
2022-05-08 06:40:02 +00:00
featuredimagepreview: "/server1.jpg"
---
Where to begin.. It's been an interesting fortnight!
I started hosting [mastodon.nz](https://mastodon.nz) around January 2020 on my home 'server' for myself and few friends. It started off as a small LXC container inside Proxmox with 2 cores and 2GB RAM allocated. It stayed this way until about 6 months ago when I kept having scheduled power outages and I couldn't keep running it from my house while maintaining a reasonable uptime.
{{< image src="/kitchen_server.jpg" caption="\"Server\" - April 2021" src_s="/kitchen_server.jpg" src_l="/kitchen_server_l.jpg" >}}
2022-05-09 06:56:08 +00:00
Mid 2021 a good friend of mine offered a great deal on some actual hosting in a datacenter. Now we had 8vCPU + 8GB RAM to play with, time to migrate everything. After a few hours of mastering `rsync` and `pg_dump` - it was done, we were set for a while. At least that's what I thought..
2022-05-08 06:40:02 +00:00
2022-05-08 06:52:28 +00:00
April 2022 brought a nice little surprise - I started getting notifications of new users joining [mastodon.nz](https://mastodon.nz). Confused I started to look at what has changed.. Didn't take long to realise this was only the beginning. I had to allocate more resource to the container to account for the higher throughput.
2022-05-08 06:40:02 +00:00
2022-05-09 06:56:08 +00:00
You can see in the image below it started to approach the allocated 3GB - I bumped it up to 4GB, then shortly after up to 6GB. That's as much as I could give it without moving to bigger hardware. (The drop at the end was a service restart after a version upgrade).
2022-05-08 06:40:02 +00:00
{{< image src="/masto_memory.jpg" caption="Memory usage in mastodon.nz container" >}}
2022-05-09 06:19:49 +00:00
I thought that would be enough for now. Nope.
I got an email shortly after from Sendgrid advising that we were approaching their 100 email/day free tier limit. Crap. I managed to upgrade the plan to account for the burst of registrations before any emails started to bounce.
2022-05-08 06:40:02 +00:00
{{< image src="/sendgrid.jpg" caption="Email throughput peaking around 400/day" >}}
2022-05-09 06:55:30 +00:00
It was about at this time I figured we probably needed to look into the future of mastodon and if we plan on maintaining it long term with a much higher capacity. I jumped on TradeMe and started working out what we could afford and what we needed to maintain a decent growth over the next 12+ months. Boom! Found the perfect thing in our price range. A secondhand HP DL360p Gen8 - With 32 cores and 80GB ram. The only issue is disks. I've never been one to trust secondhand disks. So ended up going over budget and bought 2 x 500GB EVO870's and 2 x 2TB EVO870's to run in a ZFS mirror for storage.
2022-05-08 06:40:02 +00:00
{{< image src="/server1.jpg" caption="New server" >}}
{{< image src="/server_prov.jpg" caption="Provisioning everything (Excuse the mess)"src_s="/server_prov.jpg" src_l="/server_prov_l.jpg" >}}
2022-05-09 06:19:49 +00:00
{{< image src="/server_disk.jpg" caption="Disk setup" >}}
2022-05-08 06:40:02 +00:00
After about 6 hours of configuring and installing everything required, I was ready to make a trip to a local datacenter to rack it (Thanks to previously mentioned friend!) and start the painful migration.
2022-05-09 06:37:47 +00:00
Unfortunately I don't have any photos of the datacenter/server install. But it was awesome - you can take my word for it!
2022-05-09 06:19:49 +00:00
2022-05-09 06:37:47 +00:00
Here is where we are currently sitting:
{{< image src="/server_resource.jpg" caption="Current status" >}}
2022-05-09 06:56:08 +00:00
I'm pretty happy overall with how this has turned out. I have just finished configuring nightly off-site backups to b2backblaze (Remember: RAID is not a backup!).
2022-05-09 06:37:47 +00:00
2022-05-09 06:56:08 +00:00
Costs have gone up a little bit. It's still manageable for the time being and I plan on supporting this long term. If you want to help out, feel free to shout me a coffee @ [ko-fi.com/idanoo](https://ko-fi.com/idanoo).
2022-05-09 06:39:48 +00:00
<br/><br/>
2022-05-09 06:37:47 +00:00
We are currently hosting a few other ActivityPub (Fediverse) related sites you might be interested in!
2022-05-09 06:48:27 +00:00
[Pixelfed.nz](https://pixelfed.nz) - **Photos** - Photo Sharing. For Everyone.
2022-05-09 06:37:47 +00:00
[Mtrx.nz](https://mtrx.nz) - **Chat** - An open network for secure, decentralized communication.
[OpenEvents.nz](https://openevents.nz) - **Events** - Tool to help manage your events, your profiles and your groups.
[Peertube.nz](https://peertube.nz) - **Videos** - ActivityPub-federated video streaming platform using P2P directly in your web browser.