Let's be honest: the average viewer does not care exactly how a television works. It should let them watch programs, change channels, adjust the volume, and use whatever other features they need. The same applies to radios, phones, and even cars, although some knowledge is always useful with the last of these. What about application users, such as people using web apps? Only a small percentage care about what happens inside, why Facebook is temporarily unavailable, or why a page does not immediately display every piece of information. That is why the most successful systems combine extensive features with simple, intuitive operation. They reach everyone, regardless of technical ability.
Of course, not every solution can work that way. Even programs installed on a computer sometimes require particular actions in certain situations, including from users who do not normally handle such matters. These are rare incidents, though. Returning to web applications, many people stop wondering once they know they have a browser and somewhere there is a server. Or perhaps several servers?
I used the plural deliberately. Today, we will discuss IT systems that run on multiple servers, in various arrangements. We generally call these distributed systems. This extends beyond the kind of distribution computer science students learn about, which mainly concerns computation. I hope this article, even if it does not radically change your view of applications, helps you understand how large services are built and why managing them is not straightforward.
Centralized and distributed systems
Let's begin with the opposing concepts of centralized and distributed systems. Their names give a good idea of what they mean, but we will go through them in order for completeness.
We usually imagine an IT system as having clients, in the technical sense: users, bots, or other applications using an API, with installed programs or a web browser. Their client applications, as these interfaces or endpoints are called, need somewhere to retrieve and store data, especially when sharing it with other people. They therefore contact a server application running on a server, which may communicate with its database and other components. This is a centralized system: one place handles user requests and receives connections from client applications. The vast majority of websites and applications are built this way because it is the natural, simplest approach, sufficient for most situations.
Unfortunately, it does not suit every situation. Some systems face such heavy loads that one server cannot handle all user requests. Increasing that server's power, known as vertical scaling, often comes to mind. It can help, but over time it will not solve every problem or accommodate an ever-growing audience. More importantly, failure of that one machine means failure of the entire system, because no alternative server can take over. Very complex calculations may also take an extremely long time on a single server. That is why some systems are built using a distributed approach.
This means dividing the functionality of server applications into smaller parts and placing them on different servers. These communicate with each other or receive connections directly from client applications. This is the basis of microservices. Some services can also be duplicated, for example because they are critical to the infrastructure, provided the application supports horizontal scaling. The entire application can likewise be replicated, creating a copy and removing the single point of failure.
Distributed systems need not be collections of web services. They can also consist of computing nodes that process portions of data, with their results later synchronized by a coordinator. This is usually found in scientific applications.
Examples of distributed systems
We all know systems that operate in a distributed way. Facebook, Twitter, Allegro, and specialist services used by thousands of people would not last long if built as centralized systems. Developers also know examples closer to home: version control systems for managing code repositories. SVN, or Subversion, used to be very popular. It was installed on a particular server, which every developer contacted whenever they wanted to retrieve or save changes for other team members to see. This was simple but caused many problems. Today, Git is the most common system of this kind. It is distributed and, in some respects, protects code on each developer's machine as well as on the server.
There are many kinds of distributed systems. One follows a master-slave structure: a coordinator, the master, assigns work to computing nodes, then collects and synchronizes the results. One server, or a group of servers, has the distinct role of communicating with other machines so that they can complete one task together. Because this resembles conducting the subordinate nodes, the coordinating machine is sometimes called an orchestrator. You may have encountered that term when working with containers, particularly Kubernetes or Docker Swarm.
Organizing servers as microservices is closely related. Each machine, or a machine hosting several services, provides functionality specific to its domain. There may be one orchestrator acting as an intermediary and communicating with these services. Alternatively, the system may use choreography. Yes, that word applies beyond dancing: a client application contacts a particular server, which retrieves information from others as needed.
Other distributed systems have equal-status nodes. This may involve copying the system onto multiple machines, known as replication, and having one machine whose sole task is to identify an available server and distribute the load, or load balancing. All the concepts described here can be combined. A load balancer might select only some servers or serve a particular group of microservices. The servers themselves need not have equal specifications. One may be selected more frequently because it can handle more requests, while others provide support or act as backups.
There are also structures with entirely autonomous servers. Each contains part of the data and can operate independently or communicate with other similarly configured machines. One example is a federated system, the foundation of the Fediverse and applications such as Mastodon, Pleroma, Pixelfed, and Kbin. Here, servers are separate "islands" able to exchange information, but they can also operate independently. We then colloquially call them "defederated."
What are the benefits of distributed systems?
First, distributed architecture offers greater fault tolerance. If one node fails, several others can replace it. Even when each node provides different functionality, failure need only affect one part of the application. In a document management system, for example, we might still sign contracts while company details are unavailable. You probably also recognize a bank announcing downtime, usually overnight or in the morning, for only one category of users, such as personal banking customers. This limits the outage to part of the environment. Taking some nodes offline may reduce performance without stopping the entire system. Although, given sufficient talent or a poorly designed or implemented architecture, stopping everything is certainly possible too.
Second is expandability, more commonly called scalability. If a centralized server is too slow or has insufficient throughput, it can be upgraded. There are limits, though, and doing so requires taking the machine offline for a while. With distributed architecture, serving more users, in an online game, for example, can simply mean adding servers, usually without shutting down the whole system. This has limits too, but is certainly easier than installing a better processor.
Third is performance and increased resources. This is related to scalability but also depends on the nature of the system. For distributed computation, the main reason for choosing this architecture is processing portions of data in parallel on different machines. Multiple servers can also provide more total disk space, although file distribution must be controlled so that files do not get "lost."
Fourth is easier updates while the system is running. Have you wondered how some users see different versions of the same system, one newer and one older? Or why some experience problems that you do not? Updates are initially applied to only a few servers. If a user happens to be routed to one of them, they see the changes. IT companies can thereby retain greater control over updates, watching for problems and halting further deployments if necessary, while keeping the system running and letting users continue their work.
Fifth is greater resistance to malicious activity as well as faults. This architecture does not make every attack harder, but consider DDoS, or Distributed Denial of Service. Such attacks send enormous numbers of requests to overload a server and take it out of service. In a centralized system, allowing such an attack to take hold means the service stops completely until the attack passes. Distributed systems, especially federated ones, are naturally more resistant because losing one node does not bring down the entire environment. One example is an attempted DDoS attack on a major Mastodon instance, mastodon.social. Other tools helped in that case too, but even while that machine experienced serious problems, the rest of the ecosystem continued working properly.
Each argument has considerable weight and several dimensions. Scalability, for example, can increase resources and throughput, distribute load more evenly, and improve the performance of individual components. It can also help conceal parts of the infrastructure from the outside world when necessary. Cloud solutions have become popular for a reason, although they do not suit every situation. The same applies to distributed architecture.
What are the drawbacks of distributed systems?
Rather than being "bad," they are simply not always appropriate. Architecture always involves finding suitable compromises, and distributed systems are no exception. First, they are harder to maintain because they are inherently more complex. A centralized system is easy to build and deploy because everything depends only on that system. Building microservices, connecting nodes, synchronizing them, securing them, handling exceptional situations correctly, and splitting databases, for example, requires a team supported by specialist infrastructure staff. Not every team can implement that arrangement. The good news is that, with some foresight, a system can be prepared for future distribution without introducing it immediately.
The second drawback, related to the first, is cost. Building software of this size is expensive in itself. Add the infrastructure team and the servers, and the budget grows considerably. This is not necessarily a drawback for a broadly useful system that quickly pays for itself, though. As mentioned above, you need not connect 10 machines straight away. You can start with one or two servers and prepare the software for future horizontal scaling. Upgrading a single machine can make a noticeable dent in your wallet too.
Conclusion
Distributed systems are more common than we might think. A large application is often really a collection of applications, and when we say "server," we should usually imagine a "server farm" or "cloud." Huge numbers of websites still run on servers in the traditional way, however, since distribution is not always needed. Knowing the concept, its advantages, and its disadvantages helps us choose an appropriate solution for each situation.
Best regards, and thank you. Jakub Rojek.


