Distributed Systems —a quick introduction to the basics you should know

Source: Unsplash

What is a Distributed System?

Have you ever wondered how Facebook stores and serves thousands of petabytes of user content such as photos, videos, likes, etc.? Have you ever gotten intrigued by how you can upload your photo or video on Instagram, and your followers can view the same instantly on their feeds? The answer to these questions is distributed systems!

  1. Computers
  2. Virtual Machines
  3. Containers
  4. Any node that can connect to a network and communicate by passing messages

Importance of Distributed Systems

Sometimes, it is very complex to build and hassle to maintain a large amount of data. In those cases, distributed systems come into play. They effectively handle a large amount of load by easy scaling. Two types of scaling are possible- vertical scaling and horizontal scaling. In vertical scaling, the hardware is upgraded with a faster CPU and increased memory. But it is not possible to scale in this manner after some point of time at low cost. Whereas in horizontal scaling, a completely new computing machine is added into the network, and the load is then balanced.

Different Architectures of Distributed Systems

Client-server model

The client-server model is a popular networked model consisting of three components.

  1. Server: A server is a machine that performs the task.
  2. Client: A client is a machine that is requesting the service.

Peer-to-peer model

There are no additional machines used to provide services or manage resources. The load is equally distributed among the machines present in the system, known as peers, which can serve as either client or server.

Three-tier model

In this architecture, the clients no longer need to be intelligent and can rely on a middle tier to do the processing and decision making. The middle tier could be called an agent that receives requests from clients, which could be stateless, processes the data, and then forwards it onto the servers.

Multi-tier Model

Enterprise web services first created n-tier or multi-tier systems architectures. This popularized the application servers that contain the business logic and interacts both with the data tiers and presentation tiers.

Benefits of Distributed Systems

  1. Scalability: Scaling according to the load in distributed systems is easy and generally inexpensive.
  2. Reliability: Distributed systems are fault-tolerant i.e. it doesn’t experience disruptions if a single machine fails as the load gets rebalanced between the remaining machines.
  3. Performance: These systems are extremely efficient because workloads can be divided and sent to multiple machines.
  4. Sharing of other hardware resources: Resources like printers can be shared with multiple nodes rather than being restricted to just one.

Challenges of Distributed Systems

  1. Scheduling: Sometimes selecting which job needs to run, when it should run and where it should run leads to under-utilized hardware and unpredictable runtimes.
  2. Latency: As the system is widely distributed, there will be more latency that can occur between the communication of nodes.
  3. Security: With a large number of nodes, it is difficult to provide adequate security in distributed systems because all the nodes, as well as the connections, need to be secured.
  4. Losing data: Sometimes, messages and data can get lost in the network while moving from one machine to another.

Conclusion

With the advancement in technology and the extremely large amount of data processing going on these days, distributed systems are the ultimate and only solution to cater to such requirements.

Machine Learning Enthusiast | Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store