Centralized vs Distributed Systems in a nutshell 
Tags: computerscience, centralizedsystems, distributedsystems, firstpost
Published: 2020-12-03 13:56:49

### Centralized Systems

Centralized systems follow a [client-server architecture](https://cio-wiki.org/wiki/Client_Server_Architecture) that is built around a single server with large computational capabilities. Less powerful nodes connected to the central server can submit their process requests to the server machine rather than performing them directly. Internet Service Providers, Application development servers, File Systems, and Organizational Networks are some use cases of centralized networks. As the computational power of the server machine is shared among the client machines in centralized systems, the performance of the system depends on the resource allocation and scheduling algorithms.

#### Advantages of Centralized Systems

* Easy to set up and can be developed quickly because of the client-server architecture
* The whole system can be managed and monitored through the central server. Hence, a Single Point of Control.
* All the resources of the system(Memory, CPU power, etc.) can be accessed by the client machines by sending requests to the server.
* As there is only one machine to update, the system can be updated more efficiently.
* It is easy to physically secure and maintain the server.
* Less cost to set up for a small system
* Client nodes can be easily removed and added without affecting the overall system 

#### Disadvantages of Centralized Systems

* Longer access time for clients far from the server and improper scheduling algorithms might result in [starvation](https://en.wikipedia.org/wiki/Starvation_(computer_science)).
* Problems with the central server may result in a complete system breakdown. Hence, a single point of failure.
* Less possibility to maintain backups. If the central server fails and there is no backup, all the data will be erased.
* Availability of the entire system depends on the central server, Therefore updates to the system have to be done on the fly. This results in difficult server maintenance.

### Distributed Systems

Distributed Systems follow a [peer-to-peer architecture](https://en.wikipedia.org/wiki/Peer-to-peer), it is a collection of independent computers interconnected via a network. Each node in a distributed system possesses enough computational power to collaborate on a task. In a distributed system users have equal access to data and user privileges can be enabled as required. Failure of independent components does not affect the overall system which results in higher availability and improved reliability. Distributed systems have evolved to address the limitations and problems faced by traditional centralized systems such as security, data storage, and privacy concerns. Internet, blockchain, SOA-based systems are some examples where large scale distributed systems are used in practice.

#### Advantages of Distributed Systems

* There is no central point of failure in distributed systems. The system can survive even if a node fails/is removed from the system. Hence, High fault tolerance.
* Distributed Systems are both horizontally and vertically scalable. Therefore it is much easier to add new servers as the load increases in the system and take machines offline when the workload is low.
* Allow many users access to a common database with minimum starvation.
* The workload can be shared over multiple machines as each node possesses enough processing power. This reduces the overloading of a single machine.
* The high geographical spread of distributed systems reduces the latency when getting a response to a request.
* It is easy to add and remove nodes from a distributed system without affecting the performance of the overall system.

#### Disadvantages of Distributed Systems

* As there is no common clock for the whole system it is more difficult to design and debug algorithms for the system.
* It is more difficult to order/schedule transactions in the system as different nodes have different latencies and performances.
* As all the nodes connected to a distributed system are independent, it is difficult for all the servers to agree upon the same information(consensus).
* Messages/Information can be lost in the network system because of the absence of a central server.
* Due to the distribution across multiple servers troubleshooting and diagnostics are more difficult.
* Limited software support for distributed systems.
* More effort must be put to make the network more secure and users have to control replicated data across multiple locations.

### Centralized Systems vs Distributed Systems

| Centralized Systems                                                                                                                                          | Distributed Systems                                                                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| Low fault tolerance as the central server acts as a single point of failure.                                                                                 | High fault tolerance due to the absence of a single point of failure. Servers can be added/removed without affecting the overall performance. |
| Low maintenance costs as the system is run through a single main server. And it is easier to monitor and manage the whole system using a single main server. | High maintenance costs because each node in the system comprises varying processing power and distributed across geographical regions.        |
| Systems are only vertically scalable. Processing power can only be added to the central server and up to a certain limit only.                               | Both horizontally and vertically scalable. Servers can be added and removed with varying loads.                                               |
| Less reliable as if the central server crashes the system will be unavailable for all the clients.                                                           | More reliable as if one server crashes the system as a whole can still survive.                                                               |
| Less throughput as the single server model will become a bottleneck when keeping up with increasing client requests.                                         | Higher throughput as the processing power is distributed throughout the system.                                                               |
| The overall system is less complex as the system can be managed through the central server.                                                                  | The system is more complex as we need to address replica management and maintaining consistency.                                              |

Thank you for reading. I hope you will find this information useful.