Let’s imagine we have a very simple blog application. It doesn’t require much of our server’s memory or processing power. However, it is getting a ton of traffic, which is great! We need to scale the application to keep up with growing demand.
We want to avoid any downtime to our servers so we won’t scale vertically. Scaling horizontally will enable us to handle the increase in traffic without interruptions!
Horizontal scaling should work well for performance, but it isn’t very efficient. Servers are expensive, and our application uses only a small portion of each server’s physical resources. This will result in a lot of unused physical capacity.
To solve this problem, we could turn to virtualization. Virtualization technology allows many virtual machines (VMs) to run on one physical computer. Each virtual machine is a distinct environment with its own operating system, dependencies, and users.
Virtualization would reduce the number of servers needed to run many instances of our blog application. Each server can be utilized closer to its full capacity by being split into several VMs. This allows us to horizontally scale even more efficiently based on demand.
In addition to more efficient resource utilization, virtualization brings convenience as well. Virtualization management tools simplify the task of creating virtual machines. Using these tools is more efficient than installing and managing pieces of hardware by hand.
Take a look at the image provided which shows horizontal scaling with virtualization in action. Without virtualization each server can only run one process, resulting in a lot of unused server resources. With virtualization, a single server can run multiple processes and achieve a higher usage percentage.
In the next lesson, we’ll learn about a successor of virtualization that allows for even more efficient scaling.