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.

  • Q1. We dont get much benefit when deployed on AWS?
  • Q2. If Q1 is true, then we have to go for On-Premise solutions if we use Docker image?

Please clarify. Thank you.

  • Allow web server to edit files inside a docker container
  • Error: duplicated outer port
  • Monit not clearing the pid file and restarting a process when the process becomes a zombie
  • Get IP address of Docker with Ansible
  • Giving a docker container a routable ip address
  • MongoDb docker hangs after some requests
  • docker service update vs docker stack deploy with existing stack
  • How to link two containers using docker-compose
  • Run Docker PHP-apache: Forbidden You don't have permission to access / on this server
  • How to access environment variables set by docker run from monit controlled processes inside the container
  • Golang binary built inside Docker container, still Mach-O executable format?
  • Overriding `tcp.publish_port` breaks clustering when elasticsearch is in a container
  • 2 Solutions collect form web for “Docker container image on AWS”

    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

    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
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.