Difference Between Centralized, Decentralized & Distributed Systems Oversimplified
How are you doing?
Welcome to 8bitmen.com
This article is a comprehensive write-up into centralized, decentralized & distributed systems.
What are they? What are the differences between them? How do these terms fit into software design?
Isn’t decentralized & distributed the same thing? Can they be used synonymously?
Let’s talk everything about them.
1. What is a Centralized System?
A centralized system is a system in which an individual, a group of people or a corporate entity holds the entire control over the functionality of the system.
Online social applications like Facebook, Twitter, Quora are examples of centralized systems.
We, end users don’t have a say in the architectural design, feature availability or the functionality of the applications. We don’t decide how the systems should operate. We have no control over the data.
Corporate entities hold the rights to modify or delete our data without any permission.
A centralized system has its risks, for instance, single point of failure. If the company goes out of business all our data is gone, for ever. And this has happened in the past.
Alright, I kinda get it what a centralized system is. But I’ve also heard about monolithic. Is centralized & monolithic the same thing? What is the difference?
1.1 What is Monolithic?
Monolithic is a term primarily used in software architecture which means a system is tightly coupled as opposed to having its components like backend server, database, messaging server etc. running separately.
In the early days of the web, generally, all the apps were monolithic. LinkedIn is a good example of this. It started as a monolithic app & then scaled out as it gained traction over time.
Monolithic apps were easier to write & manage without much fuss as long as the traffic on the app was upto a certain limit. Single or a couple of backend, database servers etc. did the task.
Over time as the internet became commonplace, businesses moved on to it. Apps started receiving a massive amount of traffic making it difficult for monolithic apps to handle it. We were left with no option than to scale out to a distributed model.
As the traffic on the app increased the systems needed to be scaled. Scaled up or scaled out. Scaling up means vertical scaling which means boosting the power of the server. But there is a certain limit to which the power of a server can be boosted. Scaling out means setting up a cluster of servers to handle the load proportionately. This is an efficient way to deal with burgeoning traffic.
1.2 What is a Distributed System & the Need For it?
A distributed system is a system which consists of several servers, a cluster of servers be it backend, messaging or database running together to perform one single task.
What is the need for a distributed architecture?
Simply because monolithic architecture cannot handle such large amount of traffic being received by the platform.
Several servers running together distribute the load amongst them reducing the latency of the app. They also help in tackling some of the critical issues like single point of failure, data loss prevention measures like data replication etc.
Servers in data centres are also distributed geographically, nearer to the end user, across continents, further reducing the latency of the app. I can go on about distributed systems for hours but that’s not the primary focus of this article. I need to talk about the differences. I believe, this much amount of information is enough to get a gist of what it is.
Now the important questions.
1.3 What is the Difference between the Centralized & the Monolithic?
The difference is very subtle. The term centralized is used when we talk about control. Where does the control lie? Twitter, Facebook, as stated earlier hold all the control by themselves hence they are centralized systems. Unlike peer to peer networks like BitTorrent or a cryptocurrency like Bitcoin, where the control lies equally with every user/node in the system/network.
On the other hand, monolithic is strictly used in the context of software architecture. It has nothing to do with the control.
So, can a monolithic or a distributed system be centralized?
Absolutely. Quora, Twitter, Facebook, LinkedIn are examples of this. They are centralized systems, started with a monolithic architecture & scaled out to a distributed architecture.
Does the change in the architecture of the system from monolithic to distributed, give away the control of the system from corporates to end users?
No, the system is still centralized. It’s just now instead of a single server toiling. A group of servers in a cluster perform the tasks as a team serving a centralized task.
Now, this being sorted, that monolithic & distributed has nothing to with control.
Let’s move on to decentralized systems.
2. What is a Decentralized System?
Decentralized simply means not centralized. The control, as opposed to with a single entity, lies with the end users. BitTorrent a peer to peer network is an ideal example of this.
Where the peers are responsible for the availability of content on the network. More peers seed the data, higher is the availability & download speed.
Decentralized systems just like the distributed architecture have no single points of failure. Even if several nodes go down, the network as a whole is still up.
There is no single entity control, so there is zero possibility of the network going down anytime unless all the nodes go down simultaneously which is a rare possibility when we have systems connected all over the globe.
This kind of architecture is almost infinitely scalable, unlike a centralized system in which scalability depends upon the resources of the organization in charge.
Another example of a decentralized system is blockchain. During a blockchain transaction. The participant nodes/miners decide which transactions will be preferred above the others & so on. Their computing powers decide the network throughput.
I’ve written a thorough article explaining peer to peer networks in case if you interested.
Ohk… now when it is clear what’s the difference between centralized & decentralized.
Let’s find out the difference between a decentralized & a distributed network.
2.1 Difference between a Decentralized and Distributed Network
When we use the word decentralized it’s more in the context of control. Like a peer to peer network. It’s decentralized, no central authority. Every node acts as both client & server. On the other hand, when we speak of distributed, we do that primarily in the context of system scalability. The difference is very subtle. A distributed system can also be implemented in a centralized system to process computational heavy tasks.
Speaking from my experience, I encountered the term distributed, in the context of a distributed cloud network, a cluster of servers hosted by centralized massive organizations like Google Cloud, Amazon Web services etc. They have a private distributed network of servers.
I came across the term decentralized in the context of peer to peer networks, blockchain.
Also, a distributed system comes along with several other features like data replication, intelligent fault tolerance policies, high availability etc. Their primary mission is to keep the system as a whole, running.
Again decentralized, it primarily about the control.
Ok, what if I say this new social network is distributed?
You’ll be like. Ohk, what’s the big deal? All the social apps are distributed. Like all of them. They have a distributed architecture. How else will they cope up with the traffic load?
Now, how would we react when I say this new social network is decentralized?
We’ll be like. Woah!! It’s like no single entity is controlling the network. We are all involved & hosting it from our personal computers. Cool stuff!!
This is like an intuitive difference between the distributed & decentralized systems.
I would like to know your views on this. If you think there are any other differences, don’t forget to let me know in the comments.
Can the design of a system architecturally be both decentralized & distributed?
Well, this is interesting. Consider this, if we look at blockchain as a whole, the participating nodes are already spread across the globe. The entire power of the network is the sum total of the powers of all the individual nodes of the decentralized network.
But, what if an individual node in a decentralized network wants to boost its computing power by several notches. It would require a cluster of servers to run mining or whatever computational heavy operations it runs. What do you think?
Massive companies working in the blockchain domain, facilitate decentralized flows for crypto mining or creating a market for renting idle computing power of our home computers. But they themselves use distributed cloud services like Kubernetes, or AWS services on the distributed cloud to run & manage their servers & stuff. As I said, a distributed system is built with sole purpose is in mind that the systems should be running all the time. They perform data replication, fault tolerance, are highly available etc.
One more thing don’t assume always that a blockchain will always be decentralized. I just gave you an example. Centralized or decentralized, is a question of the design.
Moving on to some of the common questions on the web in context to decentralized & distributed systems.
3. Is Internet Decentralized or Distributed?
If you try to tag the internet with a term, it’s neither. The Internet is a huge massive network of systems running online. It has no definite shape or architecture.
Internet consists of private networks, public decentralized networks, distributed networks & what not.
4. Is Blockchain Distributed or Decentralized?
If you look at the distributed ledger, all the mining nodes have a copy of the transactions on the network. Though they are encrypted with private keys, thus cannot be read. Just like in distributed systems the transactional data is replicated across nodes. So, blockchain is inherently distributed.
Now, is it decentralized too?
That depends on the design of the network. It can be either centralized or decentralized. If the control is not in the hands of any financial org. the blockchain network is then decentralized.
So, answering your question. A blockchain network can be distributed & decentralized at the same time.
Now with the fundamentals sorted. There is another extension to the decentralized architecture known as the Federated architecture. Primarily used in the decentralized social networks. Check out this write-up to know more about it.
More On the Blog
Well, guys, this was pretty much it. Do share your views on this.
If you liked the article. Do share it with your friends.
See you in the next article.
- Product Development Roadmap – Insights, By A Developer, Into The Process Of Developing New Products From The Bare Bones
- Are You Certain You Need A Mobile App For Your Business? – Bootstrapping Your Startup
- Google Databases: How Do Google Services Store Petabyte-Exabyte Scale Data?
- YouTube Database – How Does It Store So Many Videos Without Running Out Of Storage Space?
- Web Application Architecture & Software Architecture 101 Course