Let your friend know that there's a fat cache in front of this instance that takes care of all the static assets (I worked with a crew of smart people who taught me about CDNs).
The CPU spikes are a result of any instance that didn't already have the post reaching out for the post body.
The CDN serves out the media since it's static.
But, the post itself is treated as a dynamic page, so each instance of people that follow the booster will reach out... all at once.
I'm not sure about the number of requests, but this is a 5min chart of performance during that period. I'm assuming it's some percentage over 100% of the 23k followers that Lisa has.
My instance runs on a puny 4-core (Intel Celeron N5105 @ 2.00GHz) mini-PC and I have this tweak in my mastodon-web.service.
From the bottom graph, it looks like you were getting around 100 requests per second on average, with a peak of around 140, and a total of roughly 12000 requests.
For a static website, that would be child's play even for your humble mini-server, but Mastodon must be doing a lot more work to serve each request than a static web server would.
I've never run Mastodon myself, so it's kind of interesting to see stuff like this.
@argv_minus_one@xobb@lisamelton The numbers are usually higher. I thing Datadog takes an average for the period (5min) as the number looks lower when looked at in high intervals.
You’re right, that traffic would be peanuts for a static site. The large process chewing up CPU is Mastodon’s bundle.
Not the database? That's odd. I would think that serving those requests would just involve fetching from the database and reformatting everything into ActivityPub, with the database doing the heavy lifting.
I say this because, in a recent project of mine, that's how it went: the application itself did everything basically instantly, but the database had to do a lot of work for each request.
My project was non-HTTP and write-heavy, though, unlike Mastodon, so 🤷♂️.
@argv_minus_one@xobb@lisamelton There a lot of moving parts for Mastodon. @gotosocial is still developing, but I am keeping an eye out on it. It’s just one binary and is really easy to maintain, especially for single user instances.
It is so neat that people can just write their own software and connect it to the Fediverse like it's no big deal. Open protocols are ✨magic✨ and I'm here for it!