There is something that still doesn't convince me in using Docker.io. Let suppose to deploy a MongoDb replica set on 3 three different containers installed on a Linux VM running on AWS. If for any reasons the VM goes down then all the mongo instances belonging to the replica set goes down as well. Then where is the huge advantages of having different containers even 200 running on the same host machine? In that way I can't never reach fault tolerance. Maybe there is something I'm not considering. Yes I understand fast deploy and fast configuration are two of the main reasons that make Docker.io really fantastic for the developers and sys admins
Asked
Active
Viewed 93 times
0
-
Why can't you use multiple VMs? Or even better, multiple servers? Sure, it means a bit more work in networking, but it's perfectly possible. – Adrian Mouat Feb 02 '15 at 09:56
-
Ok perfect I agree with you but then the only advantage I see is maybe a fast deployment and...? – Mazzy Feb 02 '15 at 10:42
-
Ok, I don't think this is a good question for SO, but I'll attempt an answer anyway. – Adrian Mouat Feb 02 '15 at 10:59
1 Answers
1
In general I would argue that containerization is not the same thing as virtualisation. As well as the simple fact that there is no real virtualisation (kernels are shared), it is a very different approach. Container based development advocates one service per container and often follows a microservice or 12 factor app style where state is carefully managed.
There is no reason why containers can't deployed across separate VMs or servers, although this does require a bit more work wrt networking. Containers incur significantly less overhead, both in terms of physical (disk) size and CPU. They boot much faster than VMs, meaning deployments can scale up and down extremely quickly.

Adrian Mouat
- 44,585
- 16
- 110
- 102
-
But nowadays typically the tendency is quite clear. Let take Google Cloud Engine or Amazon EC2. In these case we have just VM's so containers have to run inside of VM's – Mazzy Feb 02 '15 at 11:13
-
1Both Amazon and Google have container services now. I don't see the problem with running containers in VMs - you will get many more containers into a VM than you would get VMs into a VM. Also, have a look at CoreOS, which is designed for running containers on top of HW. – Adrian Mouat Feb 02 '15 at 11:20
-
Ok I ask you a question. In production how many containers running any sort of database would you put in a single VM? – Mazzy Feb 02 '15 at 11:30
-
Ha, I think the only answer to that is "it depends". But to be honest, I would advise using the hosted services for data storage rather than a container. – Adrian Mouat Feb 02 '15 at 12:16