Hariprasad Taduru
Hariprasad Taduru

Reputation: 181

Docker container image on AWS

The advantage of using docker based container is to get performance benefit by avoiding Hipervisor layer. But when we deploy docker based image on AWS EC2 instances, what is the use? Amazon EC2 instances are running on Hipervisor layer only.

Please clarify. Thank you.

Upvotes: 1

Views: 384

Answers (2)

mootmoot
mootmoot

Reputation: 13166

The initial statement is false. Docker container still relies on OS functionality. Performance is never the selling point of docker : if you want bare bone performance, you can use assembly language and write your own stuff from scratch. Docker benefit is all about ease of deployment of your application ASAP without trouble and scale, it does not "get performance benefit".

Because of the flaw statement, question 1 is flawed.

The benefit of using AWS EC2 or EC2 container services is flexibility on scaling your needs, i.e. from T2.micro to multiple system using ELB , spot instance, redundancy, etc.

You can keep arguing about co-location/on-Premise box "performance benefit", but you can't change the box without incurred additional cost. For bare-bone machine, you must over provisioned the box, pay for all those cost upfront with your best guess.

For example, ECS c4.2xlarge (8 vCPU, 15GB RAM) may not perform as good as your over provisioned i7 16GB on-premises box for 3 years ahead. Say fact, in the beginning, c4.large (2vCPU, 3.75GB RAM) is enough for the first 6 months. In AWS, you just take the C4.large instance instead of over provisioned.

And after 6 months, your over-provisioned on-premises box face periodically spikes, you can't do anything unless you procure an upgrade. For AWS, you have many options, e.g.

  1. Just restart the VM instance to better type c4.4xlarge or m4 if it is RAM intensive than cpu intensive. And/OR
  2. Enable ECS/EC2 auto-scaling. AND/OR
  3. Use Spot fleet and spot-fleet scaling AND/OR
  4. Extend to other AWS services, e.g. RDS, lambda, etc. AND/OR
  5. You can terminate the instances any time. (If you decides to stop the project)

You should use on-premises , if

  1. You foreseen no future hardware growth
  2. Your on-premises hardware + co-location + maintenance cost(backup ,etc) is cheaper than the annual AWS fees and you intent to run it for at least 1 year

Upvotes: 0

Mark O'Connor
Mark O'Connor

Reputation: 77951

You're not considering the benefits of packaging your application as a docker container image. Once the image has been pushed to an accessible Docker registry you can run it on any compatible server where Docker is installed.

Each Docker container is an specially isolated process running on the host server. Whether the host is a virtual machine or physical server is an implementation detail.

Hope this helps

Upvotes: 2

Related Questions