Contrary to popular belief, I think that Mastodon is quite resource-efficient for what it does. The only resource hog is webpack, and only during JS precompilation. That process could be outsourced to a different machine so it's not really a runtime requirement. With jemalloc, the actual runtime doesn't use all that much RAM.
For the number of users mastodon.social is serving, this setup is pretty cheap.