Hacker News new | ask | show | jobs
by brainflake 2517 days ago
It sounds very inefficient to be honest. Containers don't add much overhead - they are essentially processes that run in constrained environments (see http://man7.org/linux/man-pages/man7/namespaces.7.html).

Why dedicate an entire ec2 instance to a single container?

1 comments

It wasn't that long ago that we were doing service-per-VM and really OP has just described an implementation of that strategy with containers.

You would scale the virtual machines to try and reach optimal resource usage rather than pick a standard fleet of virtual machines for all workloads and let a scheduler do some kind of knapsack scheduling based on available resources.

Comparatively, service-per-vm approaches are very wasteful and ineficcient, moreso if a container orchestration system is used to manage the deployment. It makes no sense to fine-tune VMs just to match the resource requirements of a single process, particularly as they change over time and as that approach leads you to a collection of custom-tayloted VMs that are needlessly cumbersome to manage and scale.

Meanwhile containers enable you to run multiple services on the same VM, scale them horizontally as you need on the same pre-determined amount of resources, use blue/green deployments to spread your services throughout your VMs automatically, and achieve all of this automatically and effortlessly.