System Design ( Day - 10 )

Single Point of Failure, Containers and Virtualisation
Single Point of failure
This is nothing but one point in which if it fails then the entire system will crash, that is single point of failure
Ex: Let’s say we have a Database and there are several servers that are connected to the same database, if Database crashed then the entire system will crash. Here Database is the single point of failure.
Solution
1 . if the Single point of failure happening in the Database, then we have to add another 1 or 2 backup Databases to store the same data, like master slave, in this way we can reduce the single point of failure occur in the Database side.
2 . If the single point of failure is happening in the server like, middleware, then we can have more Nodes or servers and also we have to add load balancer to route the request form the client to the appropriate server. now the load balancer is the single point of failure, then we need more load balancers to handle the requests
3 . Now we need to add more ip address to the DNS, and that ip address is the load balancers ip address so if any client wants to hit any request for that url then from the DNS he will be routed to any of the load balancers or it may be gateway.
4 . Now also it can fail, wait how?, because all the database and the servers are in only one place, what if any disaster happens in that places, so for that we need to deploy the same things in the different regions, for the handling single point of failure of the entire system, we can route to these according to the regions or the DNS or CDN’s.
Virtualisation and Containers
Virtualisation is nothing but a operating system on top of another operating system. let’s say we have one operating system running which is a Host Machine, on top of that Hypervisor in which it will take care of the Virtual machines that are running on top of it, on top of Hypervisor we can create many Virtual Machines, these virtual machines are managed by the Hypervisor or the we can call it as the operating system.
Containers is like same as the virtual machines but in the virtual machines, we have to run the entire operating system so it may take some time to load up, and we don’t really need that, because we want to run our application on top of the operating system, in containers, containers is nothing but a light weight Os, so that we don’t need to setup complete operating system for that, the boot time will be faster compared to the virtual machines, and these containers light weight os are called as images,
Example: Docker
Subscribe to my newsletter
Read articles from Manoj Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
