title: How to understand Amazon ECS cluster
body: <p>I recently tried to deploy docker containers using task definition by AWS. Along the way, I came across the following questions. </p>
  
  <ol>
  <li><p>How to add an instance to a cluster? When creating a new cluster using Amazon ECS console, how to add a new ec2 instance to the new cluster. In other words, when launching a new ec2 instance, what config is needed in order to allocate it to a user created cluster under Amazon ECS.</p></li>
  <li><p>How many ECS instances are needed in a cluster, and what are the factors?</p></li>
  <li><p>If I have two instances (ins1, ins2) in a cluster, and my webapp, db containers are running in ins1. After I updated the running service (through <a href="http://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service.html">http://docs.aws.amazon.com/AmazonECS/latest/developerguide/update-service.html</a>), I can see the newly created service is running in "ins2", before draining the old service in "ins1". My question is that after my webapp container allocated to another instance, the access IP address becomes another instance IP. How to prevent or what the solution to make the same IP address access to webapp? Not only IP, what about the data after changing to a new instance?</p></li>
  </ol>