I was asked an interesting question:
I am about to investigate Docker. We are moving to AWS too. So in your opinion, should I put energy on EC2 Container services or should I put my energy on Docker on EC2? Which is better ?
I find this type of question interesting because there’s not, really, a “one size fits all” answer. It depends on your use cases.
For example, If you want to use Docker Swarm mode then you’ll need
to use standard EC2 VMs and manage the environment in a traditional
way. Similarly if you’re dealing with vendor containers and need to use
docker-compose
or similar.
But you need to be careful with EC2; for example, there’s a rate limiter on the disk I/O and this can hit if you spin up/down containers too quickly.
On the other hand, if you’re creating in-house software from scratch then you might find the Amazon Container Service to be more useful, especially if integrated with Amazon’s secrets management and IAM roles. You definitely get a few useful features…
There’s a downside to using these features, though; you are tying yourself to Amazon. If you use standard docker then you could migrate to any cloud provider that lets you run VMs. Indeed this is one reason why vendors are beginning to distribute containers in Docker format; once you have the Docker engine running then the app should run unchanged.
Another dimension to think about is support; do you want official Docker support? If so, docker EE running on EC2 may be where you go. If you don’t care then Amazon container service may suffice.
Similarly cost; Docker on EC2 means pretty much running an EC2 cluster full time, but Container Service can scale more dynamically… which may save money now that Amazon will charge per-second rather than per-hour.
What about application support processes? Do your developers need access to the host running Docker (something I consider a bad idea, but…). Do your apps need to talk to backend systems that aren’t so forgiving of elasticity? Do your data controls even permit you to run this app in Amazon in the first place?
Summary
I totally expect large organisations will need to run traditional docker installs just because of vendor provided containers and the model they’ll support. You may need Swarm mode; you may need Kubernetes. All of these point to EC2.
But there are some good use cases for Amazon Container Services; it can definitely lead to a more PaaS-like usage of Docker, but with the “tie-in” caveats.
As we can see, really, there’s no “one-size fits all” solution; you may use Container Service for one problem space and Docker EE on EC2 instances for another.
That’s where I think many people will end up.