Question

Technically speaking, how does a virtual private server work? How can a VPS guarantee performance while sharing the physical resources with other VPS (I'm supposing that one server can handle several multiples VPS and not just a few).

Was it helpful?

Solution

Let's begin with an important consideration:

Nowadays, 99% of servers are virtual.

Cloud providers will give you virtual servers, and even organizations managing their own private infrastructures will work with a layer of virtual instances on top of physical bare metal machines.
Of course you can still use directly a bare metal server, but it's not convenient.

Machines have become (relatively) inexpensive, and it's easy and cheap to have physical servers powerful enough to support clusters of smaller virtual instances.

It is true that there is a performance penalty, since part of the bare metal resources are spent just to execute the virtual machines. However there are huge gains in other areas: flexibility, scalability, etc.

With this out of the way, let's answer your question.

From a software standpoint, a virtual server behaves just like a bare metal server. It doesn't matter that the actual bare metal RAM and CPUs are shared with other virtual machines, your virtual server doesn't know about them.

When you say "guarantee performance", I imagine that you are comparing VPSs to the traditional shared hosting plans. In fact, hosting companies ofter sell VPSs as a premium alternative to the default shared hosting.
In that case it is an improvement over the shared hosting because you are not sharing a machine with anyone else, and you can use and customize it however you want.

On a shared host, on the other hand, the server resources are shared with other users. This means that if your neighbour's PHP website experiences a spike in traffic, yours will be penalized.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top