Link to home
Create AccountLog in
Avatar of burnedfaceless
burnedfaceless

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of burnedfaceless
burnedfaceless

ASKER

Thanks,
so will I allocate RAM or HD Space to a container?
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.
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...
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?
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).
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