I was on a job interview today and one question I faced was:
I have my application running within a docker container on an EC2 instance (AWS Linux 64bit). The docker containers we use for the application (one application per container) connects to an RDS instance and we have the containers set up to auto-scale. What do you think of that set up?
I advised him that a better way may be to have on EC2 instance based on size of customers as he can use AWS's scalable feature to auto scale as needed. He mentioned he tried it this way but yielded slower networking for customers when auto-scaling.
My question is this: Is it more efficient from an architectural point of view, to run scalable EC2 instances running Docker that connect to an RDS? Or is the current setup better?
My reasoning behind using EC2 scalability is because he has auto scalable containers running and that if his EC2 may eventually run out of resources and may cause high CPU utilization from auto scaling too many containers.
He is using Tomcat as his web/application server if that bit of info is useful to this question.