Running a multi-purpose server, part 0: what?

The trend in Cloud Computing is this idea of Microservices, Containers, Serverless Functions, and all sorts of fancy words for “if you pay us, you can almost forget that your code is running on someone else’s computer.” But what if you don’t forget?

Before the modern era, if you wanted to run a website, you couldn’t always afford to run on someone else’s computer. Or, if you did, it was exactly that: someone else’s computer, directly, where you had access to all of its resources directly. Today, this is called “bare metal,” and such access is usually exorbitantly expensive due to the fact that computers are just so dang good and fast that most people aren’t using their computers to their full potential all the time.

The closest equivalent to someone else’s computer we have today is called VPS, or Virtual Private Servers. These use systems called hypervisors to share the resources of a single, physical computer across many different Virtual Machines or VMs, each of which acts and feels like its own computer running its own operating system. When one virtual machine isn’t running any programs, another can spend more time on the CPU running its programs. This lets the people managing the physical computers save time and space by having fewer, larger, faster, better machines instead of more, smaller, slower, worse machines.

The other big benefit of virtual machines is that the understanding and skills needed to run one can very easily be applied to a physical machine once acquired, or the other way around: a physical machine can be converted into a virtual machine if needed, whose resources can be expanded without the need to physically move around devices.

Multi-purpose servers

Nowdays, the tech industry has put a lot of focus into ways of running websites that don’t involve virtual machines. Although ultimately, virtual machines will still be used as a way of dividing up the resources of physical machines, more technologies further divide up the resources within a single VM as a way of cutting costs and abstracting out the ugly, computery parts of the computer.

For example, Docker has popularised the idea of operating system containers, where the files and functionality are separated between containers, but the actual operating system is shared between the containers. The latest trend is this idea called “serverless computing,” where even the management of the things running inside a container is abstracted away and the only difference between “services” is the files and code necessary to run them.

While container technology is useful to someone managing a VM directly, a lot of this functionality is still designed for corporate users who want strictly separated things managed by separate people. For non-corporate users wishing to manage a server for themselves or their communities, this tends to be overkill at best, and a waste of resources at worst.

A potential analogy is to think of these container technologies like a shopping mall filled with various stores and kiosks, compared to a virtual machine which is just a sectioned out piece of land to be used for buildings or farming crops. Companies love the shopping mall, because you can just plop yourself into one of the spots for a store, do minimal work, and start selling things. But not everyone can afford to pay rent for the mall, and there’s a nonzero bit of resources spent housing the mall itself, even though it still tries to optimize the number of stores inside it.

Even though the tech industry is migrating to putting everything inside the shopping mall, it’s hopefully clear why this isn’t the right approach for individuals or small communities, and isn’t the best for long-term sustainability.

Running

I’m planning to turn this into a multi-article series, and I have a lot of different topics I want to discuss. The three big pieces are going to be hardware, storage, access, and services. Hardware will go over the things you should be looking out for if you want to set up a physical machine, or the kinds of resources you’ll have for a virtual machine. Storage will go over everything related to storing and backing up data, the ACID system of modelling storage (atomicity, consistency, isolation, and durability), and the pros and cons of various systems. Access will go over how you actually connect to the server and let other people connect to the server securely and safely. Services will go over the heart of running a multi-purpose server, which is how to set things up and run them.

I willingly acknowledge that I have a lot of opinions about my particular ways of managing a multi-purpose server, but over time I’ll hopefully be going through all kinds of setups, and will try to incorporate feedback from folks on what they’re looking to learn about. My goal with this series is to help provide people with the knowledge they need to set up and run a multi-purpose server for themselves or their communities, and to help provide resources to people developing applications to make their work more compatible with a “ground computing” approach. (As opposed to cloud computing. Since like, you’re not in the clouds, you’re just on the ground. Get it?)

Anyway, look forward to this, and feel free to constantly pester me to work on this, since I know that it’s going to be hard to get motivated. Also let me know if you have any particular suggestions for what to talk about, since I’d love to actually help people out in addition to rambling about what I’m already doing. You can get in touch with me on the fediverse at @clarfonthey@toot.cat and can also email me at usr@ltdk.xyz.