This is all basically hypothetical, but it’s something I want a better idea about to improve my concept of networking, service providing, and etc. Additionally, I think services like Mastohost are healthy for the growth of the fediverse as it eases concerns for business use, enterprise use or even broader “community” use. I think it will be important for the future of a federated internet that many of these types of services exist.
Let’s get the obvious out of the way: You’d probably need a lot of hardware to achieve this type of service. We’re talking about either having a micro datacenter or renting a datacenter from someone else. You’re probably not going to get away with doing this on a bog-standard VPS regardless of how much storage you buy (though, if I’m wrong, feel free to correct me.)
I understand how virtualization via proxmox works (kind of, on a surface level) and I imagine that it would work similarly to that but with a preconfigured docker image, but how exactly does someone integrate virtual machine creation with client requests?
Normally I think about services running in a docker which would communicate with other docker containers or the host server – so, for example, you can configure your Jellyfin to be visible to other containers that might be interested in sharing data between the two. But when it comes to requests for hosting new docker images that need persistent space, how would you manage such a task? Additionally, if we’re talking about a multi-computer environment, how do you funnel a request for a new instance to one-of-many machines?
This seems like a basic, fundamental server hosting question and may not be appropriate for “self hosting” as it’s probably beyond the scale of what most of us are willing to do – but humor a man who simply wants to understand a bit more about modern enterprise compute problems.
Feel free to share any literature or online documentation that talks about solving these types of tasks.
Using VMs and containers for multi-tenant hosting is usually the least efficient way of running something this, but IF that is what they are doing, they are just spinning up a new container for each client and running it in a Kubernetes cluster.
As far as the request routing, each account on a host like this requires a domain name, and then you match the requests for that domain on the incoming proxy, and route them to the container assigned to that name vhost.