Today's article is proof that inspiration for a text can come from anywhere, at any time. This time it came from a meme that popped up on my timeline on a social network. Specifically, this picture:
The picture is fairly funny on its own: a big sofa stands for something huge, roomy and powerful, and a tiny kitten looks like it got lost on that piece of furniture. Once you read the captions, the joke lands mostly with people who write and deploy software. On one side there is an environment that needs careful preparation and a very good, expensive machine. On the other, all of it is meant for an application with so few users that it could just as well run on an ordinary "home" server and still work fine. Hilarious.
After a moment of reflection I realized there is more to this meme. It is not just an internet gag meant to brighten the life of a sad programmer. It captures (perhaps by accident) the attitude some people, especially younger ones, have toward the conditions they meet when deploying a system. Everyone wants great hardware for their software, but the truth is that a "monster" is not always needed and not always worth the money. Unfortunately, not everyone understands that, and in the worst case it leads to friction and pointless arguments. It is a specific case of being a "gunslinger" in a world dominated by cloud and DevOps thinking.
Today we will dig into this topic, and it will probably end up closer to an essay. To keep the text educational, we will also unpack the odd abbreviations the meme is about. Some of you may be curious what these mythical containers are, along with Docker and Kubernetes, which you have heard about at some point.
What are containers?
To explain what I mentioned at the end of the introduction, and why the meme is funny, we first have to talk about what containers are. I warn you in advance that this word will come up very often in the text.
Some of you may know the concept of virtual machines. They are, in a way, "computers inside a computer". More precisely, in our operating system (the host) we can run software that carves out resources for installing additional, separate operating systems. These are isolated and work as complete environments of their own. This lets you test something, run Linux on Windows (or the other way around), and also set aside space for hosting a specific application. It means one system can provide environments for many customers on a single computer. That is exactly how the virtual private servers (VPS) offered by many companies come about: a powerful physical machine is split into many smaller, virtual ones.
The advantage of virtual machines is that they are isolated and their parameters can be changed on the fly (at least some of them). Adding RAM, for example, does not mean physically opening the computer, fitting a chip and booting it again. You move a slider in the virtualization tool and maybe restart. But "VMs" have one drawback that anyone who has used them, even at home, notices right away: they are "heavy". They are operating systems running inside another operating system, with the physical machine simulated. That costs the host resources and also affects the performance of the guest environment, because none of it runs natively. In most use cases (we will come back to this, and it is the heart of today's text) that is still enough, but rebellious IT people found another solution.
That solution is containers, which are closely tied to Unix-like systems. They are a form of virtualization, but at the operating system level: the system lets you create a "box" with its own allotted resources, in which specific components are installed. So where is the catch? Virtual machines simulate the WHOLE computer (all the hardware included), while containers run within the host's operating system, without a full virtualization tool in between. That makes them much "lighter", and therefore efficient, and conceptually simpler to manage. Because they sit closer to the host, the isolation is not as strong, but with a bit of care this should not be a cybersecurity problem.
Why are containers so important, and why did they revolutionize application management in many cases? For example, because they:
- let you prepare the environment in advance and deploy it in practically unchanged form to different machines,
- are isolated from the host's application components, so a container can use its own HTTP server regardless of what the host has,
- let you pin exact versions of components, so you should not end up with an application that works on one machine because a component is at version 3.3, and fails on another because someone installed 3.4,
- do not require installing every application component directly on the developer's machine and juggling software versions (a developer can work on two applications, one needing PHP 7.4 and the other PHP 8.3, by spinning up an "all-in-one" box for each),
- carry little time and resource overhead, so they do not load the system enough to be a problem,
- are light enough to be chained together so they use each other, while staying efficient and isolated from everything else.
Let me clear up one thing right away: yes, virtual machines could in theory be shared as well. The problem is that they are so inefficient and large that it makes no practical sense. Updating the code delivered to such a virtual machine is another problem: it is doable, but simply inconvenient.
Containers are the foundation of the DevOps methodology and of many deployment processes. They make software updates easier and have become the answer to many problems in software development. They are not without flaws. They take some knowledge to write the rules that build and manage them, and they need a suitable environment to run such packages. This is where Docker comes in, a service for managing these packages. With Docker we can run containers, pull their images, stop them, get inside them and so on. At the same time, remember that Docker is not the same thing as a container (just as Word is not a text document), and the software with the famous logo of a blue whale is not the only one that can run containers. There are also LXC and Podman (often recommended instead of Docker because it does not need such broad system privileges, though it has its own drawbacks).
What matters for us in the context of the meme? A container is a "box" that holds one (usually; there can be several) component of an application, for example a frontend, a backend, a database, a caching system or something else. It is common for a developer to need PostgreSQL in one project but not want to install it on their computer, so they start a container.
What is Kubernetes?
When people started using containers on a massive scale, it quickly turned out that there were a lot of them. So many that programs like Docker alone stopped being enough, because there was a need to manage many containers, their order, their scaling and so on. And we are not talking about a developer's computer with a few such packages running, but about production environments, where there may be far more of them, running them is critical, they sit on many servers and, above all, they are scaled. This is called orchestration. Picture a conductor who looks after many musicians playing different instruments and decides who comes in at which moment, how loudly, and how many players from each section are needed for the orchestra to sound beautiful.
There are several such "conductors" on the market, and one of the simplest is Docker Compose, which makes it easier to start and manage several containers at once in Docker. For heavy server use it is usually not enough, especially when we deal not with one instance but with several connected into so-called nodes. That is why the makers of Docker offer a second tool, Docker Swarm. It has more features and really does let you run an "orchestra" made of many servers. But even Swarm, which is relatively simple to use (compared to the next hero of this text), may not be enough in more advanced cases. Then the aforementioned Kubernetes, also known as K8s, steps in.
It is a complex, modular system that automates deployment of containerized applications, makes scaling more pleasant (including letting algorithms calculate the right setting automatically) and simplifies everyday management. It divides infrastructure into clusters, the nodes already mentioned, and pods that can be distinguished within them. Interestingly, it is an open source project that started at Google but is now run by the Cloud Native Computing Foundation (CNCF). Importantly, it is an extensible system with a very large community around it and many tools that help with operating it. Those tools come in handy all the more because Kubernetes is quite complicated, and configuring it is not something you do on the fly between your first coffee and breakfast.
What we need to know in the context of the meme from this episode is that Kubernetes is a system that makes it easier to manage containers on potentially many servers. Note that we can also run containers on virtual servers. For orchestrators it does not matter whether something runs on a physical or a virtualized machine, because a server is a server.
How do you measure the number of users of an application?
On the other side we have the information that 12 people use the application. Contrary to appearances, this is not such a rare case. Software houses often build software for a particular company, built around its needs and specific employees, and companies come in different sizes. Even a system for 12 people makes sense if it solves a problem, meets a business need or simply speeds up work, for example by letting you handle more customer requests.
Estimating the number of users of an application can be quite hard. The simple case is software for a specific group of people, because you know how big it is. But even then you have to remember that IT systems evolve, just as customers' needs do. An application that was originally meant for 10 people may grow into something bigger over time, or the company may simply grow. It is even harder with software meant for the open market, which is supposed to attract as many people as possible. Sizing such a large target group is more a job for marketers and salespeople, but the IT team has to plan infrastructure that will not collapse under X simultaneous people.
So what are we actually talking about when we measure the size of a user base? Users are the right term from the marketing point of view and for "ordinary" people, but when we measure systems we talk rather about how many HTTP requests they can handle. That depends on the performance of the application, the HTTP server settings, the power of the machine and many other factors, so even a rough estimate is very hard. What you can do is test the capacity of the software with programs such as JMeter or k6.
Another thing to remember is that the number of requests handled can be concurrent or peak. The first value is the average, real load on the application most of the time. We talk about it especially for social networks and game servers, but also for applications built for companies, where we assume the software will be used, say, 8 hours a day by 40 people. In some cases, though, you have to account for possible "peaks", moments when requests suddenly grow to an exceptionally large number and the server has to cope. Examples are a news item on a sports club's website, a new article on a popular blog or the announcement of a contest. The organizer of the "OpowiemCi" Ranking also has to deal with this: when voting opens, the server settings must be changed so that it can take increased traffic for the next several days.
So one thing is the likely volume of users using the application at the same time and in "hot" moments. The other is deciding what infrastructure that requires. That is much harder and often comes more from experience or experiments.
Is Kubernetes always needed?
And here we get to a certain madness, let's not be afraid to say it. Not every application has to be prepared for massive infrastructure, just as not every IT system needs a cloud and a solid administration department. Put plainly, a large part of the software written every day can run on normal, simple servers, where developers often have fewer privileges than root, but also more peace of mind, because the whole configuration is handled by qualified teams.
Sometimes, though, you meet a different attitude among IT people who grew up in times when everyone talks so much about clouds, containerization and so on, and who believe that absolutely every piece of software running on a server must use these conveniences. An application made of a single form visible to a few dozen people? Buy an AWS instance! A sales system for a handful of people? We will scale horizontally on four machines! A simple landing page in technologies the company uses in other applications anyway? First we have to spend a whole day on a detailed container definition in a Dockerfile! Because that is how they do it in all the startups now, in the U-S-A, in Silicon Valley, so we have to as well! I saw it in YouTube tutorials!
Of course, I am joking a little here, and what I write does not mean you should not think about the future and prepare an application for scaling or containerization (which can be very useful, especially for developing the code itself). The example of an application with one form may even be a poor one, because that form could be publicly available 24/7 and used by tens of thousands of people, so running copies on several servers may make sense. But that is the point: it may, and you should do it deliberately. Everything depends on the situation and an architectural assessment. You do not always need solid infrastructure run by an experienced DevOps engineer to deploy an application that is supposed to deliver results quickly. There are cases where it has a future and the higher costs are justified, but in many cases it makes no sense, because the software house or the client spends a lot and the effect is felt neither in the short nor in the longer term. Not everyone understands this, and it causes friction. It is similar to a lead developer's reluctance to adopt some fashionable technology when there is no solid argument that outweighs the counterarguments. Believe me, fashion and "because everyone does it" are far from enough to suddenly introduce Rust into a team and project whose tech stack is 99% Java.
It is the same as with advanced software architecture. Of course it is always good when software is open to scaling, growth and extension and does not lock itself into its initial conditions. But you also have to take common sense and the business into account. If a client expects an application for a dozen or so people with a few simple views, and that will not change in the next few years, then building a microservice architecture just for the sake of it misses the point, because preparing the structures takes more time than actually writing the functionality. In such a case it is much better to write it simpler and faster and, once you have solid code that works on "smaller" infrastructure, adapt everything to larger traffic when it is really likely to arrive. Still, and I say this in advance to the angry crowd that disagrees with me, everything depends on the situation, conditions and assumptions. There are situations where you really do have to think about the future. And there are those where it will be a plain waste of budget, time and capacity, just to feel "professional".
Summary
Boiling it down to a simple conclusion: an application that works for 12 people, unless it is exceptionally complicated, should run fine on a simple server. You do not need infrastructure of 20 nodes with 4 virtual CPU cores each, scaling itself according to need and managed by Kubernetes, to run such software. It is a classic case of taking a cannon to an ant.
That does not mean preparing an IT system for more complex conditions makes no sense in any case. It is certainly worth thinking about, but do it when it really pays off, in the near or somewhat more distant future.
Best regards and thank you, Jakub Rojek.


