Centralized vs. Decentralized Systems

We are constantly hearing about how centralized systems are bad, and how decentralized ones are the saviours of our future. We should at least scratch the surface of what is going on with centralized and decentralized systems to understand why? We will not dive in deeply. And the below explanations do not fully cover every aspect (if they were, this would be a full distributed systems course). Fortunately (for you), it is not. I will only cover the parts that will grant us the fundamentals, so that we can compare decentralized and centralized systems. And spoiler alert, centralized systems do come in handy in some situations as well.


How Traditional (Centralized) Systems Work?

Fully Centralized Systems:

Centralized systems are systems that use client/server architecture where one or more client nodes are directly connected to a central server. This is the most commonly used type of system in many organizations where the client sends a request to a company server and receives the response.

For the ones who are not accustomed to the terminologies, imagine the server as a restaurant, and the clients as customers. When you want to get food (service), you have to contact the restaurant (an analogy might be visiting the website in this case). Then you made your order (querying something from Wikipedia’s database, or getting any online service), this is the request. Then the restaurant (server) provides you the with food, which is the response. That’s roughly it!

Advantages of Fully Centralized Systems:

  • More cost-efficient for small systems up to a certain limit – As the central systems take fewer funds to set up, they have an edge when small systems have to be built.
  • Quick updates are possible – Only one machine to update.
  • Easy detachment of a node from the system. Just remove the connection of the client node from the server and voila! Node detached.
  • Server does not need to sync with other machines/nodes, thus it can perform much faster.
  • Easier management in general (updates, new features, control mechanisms, etc.), because there is a single central unit only.

Disadvantages of Fully Centralized Systems:

  • Difficult server maintenance – There is only one server node and due to availability reasons, it is inefficient and unprofessional to take the server down for maintenance. So, updates have to be done on the fly (hot updates) which is difficult and the system could break.
  • Can’t scale horizontally, and vertical scaling is cost-efficient up to a degree (these terms may sound alien, google it if you want, or leave it, it is not critical).
  • Bottlenecks can appear when the traffic spikes – as the server can only have a finite number of open ports to which can listen to connections from client nodes. So, when high traffic occurs like a new year’s eve, the server can essentially suffer a Denial-of-Service attack.
  • Single Point of Failure:
    • Less possibility of data backup. If the server node fails and there is no backup, you lose the data straight away.
    • If the server gets hacked, it is game over.
  • You have to trust the single server:
    • It controls your private data.
    • Whether your request will be handled or not, is up to the server.
    • Whether the server is obeying laws or not, is not something you can know (the procedure is mostly not transparent in centralized systems).
    • In short, you have to trust the service provider for nearly everything, you don’t have any control over the system.

Distributed Systems:

In distributed systems, there is still a single service provider (authority), but instead of a single machine, there are multiple machines and a load balancer. Google and Amazon might be good examples of this.

Now, here is where things are getting complicated. Thankfully, we do not need to understand every aspect of this architecture. Imagine this as the chains of some store. There are multiple McDonald’s across the world. If you want to get a service from a McDonald’s (which means you have to change your diet), you can go to the nearest one. Although all McDonald’s chains have their own local manager, they are still governed by a single global authority. This is the perfect analogy for a distributed system. There are multiple servers, but the CEO of the company is still a single authority.

Advantages of Distributed Systems:

  • Since there is still only one authority present, decision-making (vision of the company, etc.) is easy as it is in centralized systems.
  • Some disadvantages of the centralized systems are eliminated:
    • Easy Difficult server maintenance – Now there are multiple servers, we can afford some of them to be offline for some time to apply maintenances.
    • Can Can’t scale horizontally.
    • Bottlenecks can NOT appear when the traffic spikes (if appropriately scaled).
    • Multi Single Point of Failure: the system can tolerate up to some degree of nodes being corrupted/malfunctioning.

Disadvantages of Distributed Systems:

  • It is not cost-efficient as Centralized Systems (for small-scale solutions).
  • Quick updates are not possible anymore – Many only one machines to update.
  • Easy detachment of a node from the system. Just remove the connection of the client node from the server and voila! Node detached. But this does not apply to server nodes, removal of a server node is complicated.
  • Server does not need to sync with other machines/nodes, thus its performance will be hindered.
  • More complicated easier management in general (updates, new features, control mechanisms, etc.), because there are multiple server nodes now.
  • On top of that: you still have to trust the single authority:
    • They control your private data.
    • Whether your request will be handled or not, is up to the server.
    • Whether the server is obeying the laws or not, is not something you can know (the procedure is mostly not transparent in centralized systems).
    • In short, you have to trust the service provider for nearly everything, you don’t have any control over the system.

That was a lot? Try taking a distributed systems course. You should be praying right now.

Now, pull yourself together, because we are continuing.


Decentralized Systems:

Instead of a single authority, there are multiple authorities (or no authorities at all, if it is fully decentralized). Everybody is a client, everybody is a server.

If we want to compare this with McDonald’s, here is how it might work: you grab some ingredients for your food (maybe only tomatoes), then go to the restaurant. For other ingredients, you get them from other people, and also, you shall share your tomatoes with others. Basically, everybody is a provider, and everybody is a consumer.

Advantages of Decentralized Systems:

  • Load balancing can be done more efficiently than distributed systems.
  • High availability – Some nodes(computers, mobiles, servers) are always available/online for work, leading to high availability.
  • All operations are transparent – meaning that, you can inspect others’ operations as well for checking their validity.
  • You don’t have to trust anyone (trustless). Nobody can manipulate or alter your data. In fact, not even you can manipulate your own data once it is processed (data is immutable in blockchain).

Disadvantages of Decentralized Systems:

  • No regulatory oversight (much more chaotic in every aspect than centralized systems).
  • Difficult to know which node failed – Each node must be pinged for availability checking and partitioning of work has to be done to actually find out which node failed by checking the expected output with what the node generated.
  • Difficult to know which node responded – When a request is served by a decentralized system, the request is actually served by one of the nodes in the system but it is actually difficult to find out which node indeed served the request.
  • Horizontal scaling is at its greatest (hence leading to minimal bottlenecks). However, a fleet is as fast as its slowest ship. If nodes are not powerful enough, the whole system can suffer.
  • Even for a single operation, a consensus is needed between all nodes. Making simple operations much more costly compared to centralized and distributed systems.
  • Updates and changes to the system may result in division (some nodes may not prefer to update, and there would be version1 and version2 of the system afterwards).
  • In fully decentralized systems, we cannot force anyone to do anything (this is both good and bad).

Blockchain is not a magic wand

Confucius

As you can see, blockchain is not the solution to all of our problems. Airplanes did revolutionize the logistic and transportation industries. They are indeed fascinating. Yet, they did not render cars and ships completely useless. They are not better than their alternatives in every aspect. You are not going to your grocery store by plane. Don’t expect a different scenario for Blockchain. It will be revolutionizing, but will not replace every single technology.