In light of recent technological changes and advancements, distributed systems are becoming more popular. Many top companies have created complex distributed systems to handle billions of requests and upgrade without downtime.
Distributed designs may seem daunting and hard to build, but they are becoming more essential in 2021 to accommodate scaling at exponential rates. When beginning a build, it is important to leave room for a basic, high-availability, and scalable distributed system.
There’s a lot to go into when it comes to distributed systems. So today, we introduce you to distributed systems in a simple way. We will explain the different categories, design issues, and considerations to make.
Today, we will learn:
Learn how scalable systems are designed in the real world. Develop critical system design skills and take on the System Design Interview by mastering the building blocks of modern system design.
At a basic level, a distributed system is a collection of computers that work together to form a single computer for the end-user. All these distributed machines have one shared state and operate concurrently.
They are able to fail independently without damaging the whole system, much like microservices. These interdependent, autonomous computers are linked by a network to share information, communicate, and exchange information easily.
Note: Distributed systems must have a shared network to connect its components, which could be connected using an IP address or even physical cables.
Unlike traditional databases, which are stored on a single machine, in a distributed system, a user must be able to communicate with any machine without knowing it is only one machine. Most applications today use some form of a distributed database and must account for their homogenous or heterogenous nature.
In a homogenous distributed database, each system shares a data model and database management system and data model. Generally, these are easier to manage by adding nodes. On the other hand, heterogeneous databases make it possible to have multiple data models or varied database management systems using gateways to translate data between nodes.
Generally, there are three kinds of distributed computing systems with the following goals:
Note: An important part of distributed systems is the CAP theorem, which states that a distributed data store cannot simultaneously be consistent, available, and partition tolerant.
There is quite a bit of debate on the difference between decentralized vs distributed systems. Decentralized is essentially distributed on a technical level, but usually a decentralized system is not owned by a single source.
It is harder to manage a decentralized system, as you cannot manage all the participants, unlike a distributed, single course design where one team/company owns all the nodes.
Distributed systems can be challenging to deploy and maintain, but there are many benefits to this design. Let’s go over a few of those perks.
Scalability is the biggest benefit of distributed systems. Horizontal scaling means adding more servers into your pool of resources. Vertical scaling means scaling by adding more power (CPU, RAM, Storage, etc.) to your existing servers.
Horizontal-scaling is easier to scale dynamically, and vertical-scaling is limited to the capacity of a single server.
Good examples of horizontal scaling are Cassandra and MongoDB. They make it easy to scale horizontally by adding more machines. An example of vertical scaling is MySQL, as you scale by switching from smaller to bigger machines.
Learn how to build complex, scalable systems without scrubbing through videos or documentation. Educative’s text-based courses are easy to skim and feature live coding environments, making learning quick and efficient.
While there are many benefits to distributed systems, it’s also important to note the design issues that can arise. We’ve summarized the main design considerations below.
Distributed systems aren’t easy to get up and running, and often this powerful technology is too “overkill” for many systems. There are many challenges distributing data that ensures various requirements under unexpected circumstances.
Similarly, bugs are harder to detect in systems that are spread across multiple locations.
Cloud computing and distributed systems are different, but they use similar concepts. Distributed computing uses distributed systems by spreading tasks across many machines. Cloud computing, on the other hand, uses network hosted servers for storage, process, data management.
Distributed computing aims to create collaborative resource sharing and provide size and geographical scalability. Cloud computing is about delivering an on demand environment using transparency, monitoring, and security.
Compared to distributed systems, cloud computing offers the following advantages:
However, cloud computing is arguably less flexible than distributed computing, as you rely on other services and technologies to build a system. This gives you less control overall.
Priorities like load-balancing, replication, auto-scaling, and automated back-ups can be made easy with cloud computing. Cloud building tools like Docker, Amazon Web Services (AWS), Google Cloud Services, or Azure make it possible to create such systems quickly, and many teams opt to build distributed systems alongside these technologies.
Distributed systems are used in all kinds of things, everything from electronic banking systems to sensor networks to multiplayer online games. Many organizations utilize distributed systems to power content delivery network services.
In the healthcare industry, distributed systems are being used for storing and accessing and telemedicine. In finance and commerce, many online shopping sites use distributed systems for online payments or information dissemination systems in financial trading.
Distributed systems are also used for transport in technologies like GPS, route finding systems, and traffic management systems. Cellular networks are also examples of distributed network systems due to their base station.
Google utilizes a complex, sophisticated distributed system infrastructure for its search capabilities. Some say it is the most complex distributed system out there currently.
You should now have a good idea how distributed systems work and why you should consider building for this architecture. These systems are important for scaling for the future. There is still a lot to learn. Next, you should check out these topics:
To get hands-on practice with building systems, check out Educative’s comprehensive course Grokking Modern System Design for Software Engineers & Managers. In this learning path, you’ll cover everything you need to know to design scalable systems for enterprise-level software.
By the end, you’ll understand the concepts, components, and technology trade-offs involved in architecting a web application and microservices architecture. You’ll learn to confidently approach and solve system design problems in interview settings.
Join a community of more than 1.3 million readers. A free, bi-monthly email with a roundup of Educative's top articles and coding tips.