Difference between LDX containers and VMs

I was wondering some basic things about LDX containers (how they are different from virtual machines) and also why they would be preferred for shared web hosting:

So as far as differences between VMs - do you allocate a certain amount of RAM or HD space to them? Or can you set them and they scale?

Why would they be preferred for shared web hosting? It seems like there would be some security benefits. Would it guarantee some performance if one site got a ton of traffic?

Would there be any disadvantages to running LDX containers?
burnedfacelessAsked:
Who is Participating?
 
nociConnect With a Mentor Software EngineerCommented:
LDX?... or do you mean LXD... LXD is the frontend for LXC.
LXD is a management layer for LXC...
With LXC  all conatiners (Like Docker) share one kernel... which presents itself as a unique instance to each container.
With regular VM's all VM's also run their own kernel.  (Full VM's or Hypervisors).
With Docker & LXC the kernel code is shared among all containers.

This requires that the container systems are of the same architecture as the host. (Host Linux -> Container Linux  or Host Windows -> Container Windows).... With VM's the Host & Container can differ.   (BTW, Using a Debian Container under a CentOS Host will work if both support the same kernel, mostly does work).
0
 
burnedfacelessAuthor Commented:
Thanks,
so will I allocate RAM or HD Space to a container?
0
 
nociSoftware EngineerCommented:
Yes, but the disk space is a subdirectory on your existing disk...  (that sub directory is the "root" for the container.
(The container cannot go upwards; the host can go into the container directories).
All processes "inside" the container share the RAM with the host. (they are part of the host page tables etc.).
Within the container the uid 0 is NOT uid 0 in the host. (there is a renumbering schema).
Same for PID's so a process list inside the container is different from outside of the container. (try a ps command on both).
One container will not see, be able to access processes & data from another container or the host.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
arnoldCommented:
Much depends on your needs. The point noci made.
Lxds operate at host resource level, while VMs are guests and depend on scheduling by a hypervisor allocating resources between/among VMs.


The container provides some isolation compared to a straight forward shared hosting. I.e. DDoS on one site, impacts all, while in the lxd, the impact could be limited to the site/sites within the container only.

VMs you have/consume more since you have to install the os, conf...
0
 
burnedfacelessAuthor Commented:
Thanks guys one last question - do I need to give each LXD their own IP Address, or is it sufficient to use IP Tables to forward the request to the container's local IP Address?
0
 
nociSoftware EngineerCommented:
the LXD daemon (runs once..., has one address).... it starts LXC environments..
that can have private nets, natted nets, bridged nets...

LXD is the management interface.. (if you compare to XEN,   the Dom0..., and DomU's are done through LXC).
0
 
Prabhin MPEngineer-TechOPSCommented:
LXD has it own private netwok, which include the network configuration like bridge, nat,.
For outside access to map to internal network address to the container.
Hope this will help you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.