Day 3 Guide: Introduction to Virtual Machines
Understanding efficiency with a real world example
Situation 1: Assume that there is a 1 acre land in which you build your own house and keep the whole resources such as electricity, water etc. to yourself and plan to consume it personally. (Inefficient usage)
Situation 2: Finally you observe that the whole area of the land is not being used by you and hence you determined a spot which was around 1/4th of the total area of the land and rented it to our to make more efficient usage of the space.
Here comes the DevOps mindset to do it i.e. efficiency. As a DevOps engineer your end goal should always be achieving/improving efficiency. Similarly how in the situation 2 of the above example we saw the efficient usage of the land is the same way we should build a mindset to tackle things when we are on the cloud as DevOps engineers. We have to make sure that all the resources are being used.
Understanding the need of Virtual Servers/Virtualization
Assume that there is a developer from a company who developed an app called as App1 and deployed it to a physical server i.e. Server 1. Now there server to which the app is deployed has 40 GB RAM and 4 CPUs' but the app that is deployed to this very server only needs 4 GB RAM to run. So, the devops lens should see that there is a 36 GB of resource wastage/ here was the actual problem i.e. inefficiency. Here is where the concept of Virtualization came into existence.
What is Virtualization?
This is a method by which you divide a single physical server into multiple servers by logical partitions using a hypervisor. This makes the process more efficient and ensures that none of the resources are wasted/unused. For eg: Let's consider a Physical Server S1, now with the help of hypervisor we can make logical partitions in the physical server and divide a single physical server to many Virtual Machines such as VM1, VM2, VM3 etc. and can be used by different teams as needed. Also VM1 is not dependent on VM2 or any other VM's for any sort of resources such as RAM, CPU etc and is independent.
Note :- These are logical isolations/partitions and not physical ones, we just divide the server's resources to multiple VM's so that the memory and the resources can be utilized in an efficient manner.
Hence by only using one Physical server/Multiple VM's we can carry out a tasks efficiently with the help of virtualization.
What is a Hypervisor?
A Hypervisor is a software which installs Virtual machines in your Physical Servers. This is done by doing logical separation (not physical) of the server into multiple virtual servers, hence the whole memory/resources of the physical servers are divided into chunks (VM's) and can be allocated and utilized as per usage.
Some of the popular hypervisors' are vmware, zen etc.
Note: - In the above process we added efficiency through DevOps i.e. by automating the process of virtualization using a hypervisor.
How do the Big Tech Giant's do it?
All the tech giants like Microsoft, Amazon, Google who provide cloud services follow the same method of virtualization for efficient usage of resources. Let's take Amazon Web Services as an example, What it does is, for a country like india they would setup these huge data centres in the metro cities like Mumbai, Chennai, Hyderabad and deploy millions of Physical Servers in these data centres.
Also, all these Physical servers have hypervisors installed in them. So if i request for a Virtual Machine (VM) or EC2 Instance for the mumbai region, the request would be processed in one of the Data Centres based out of Mumbai and the hypervisor installed in the physical servers would create a new VM for me and will share the necessary details such as IP address, Key Value pairs etc.
In general all the cloud providers have built their data centres determining the locations from where their users won't encounter any latency issues while using their VM's.
If the concept of VM's did not exist, the whole data centre would have only accommodated 100-150 users because each user would have been allocated one physical server which would not be scalable beyond a point and also very inefficient whereas now it accommodates more than millions of users using virtualization.
Cheers, Happy Learning!
Subscribe to my newsletter
Read articles from Abhinav Prakash directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Abhinav Prakash
Abhinav Prakash
I am a Big Data & DevOps Engineer, trying to solve problems through Data Analytics & Engineering. I am trying to fit in & adapt to the vast technology pool that the world is currently residing in and be part of the scene by sincerely contributing to it through my stream. I dabble mostly on Java, YAML, Cloudera, Apache Hadoop, Ansible & Linux. It's been almost two years since I entered the industry and started working in the engineering team of the organisation that I am currently part of. I graduated in Information Technology & Engineering from SRMIST, Chennai and have been fascinated about systems & data manipulation since then. You can find me playing Counter Strike, Chess and listening to music or find me involved in a political debate at a forum when I am not working. Cheers🤝