title: How to gracefully shut down or remove AWS instances from an ELB group
body: <p>I have a cloud of server instances running at Amazon using their load balancer to distribute the traffic. Now I am looking for a good way to gracefully scale the network down, without causing connection errors on the browser's side.</p>
  
  <p>As far as I know, any connections of an instance will be rudely terminated when removed from the load balancer.</p>
  
  <p>I would like to have a way to inform my instance like one minute before it gets shut down or to have the load balancer stop sending traffic to the dying instance, but without terminating existing connections to it.</p>
  
  <p>My app is node.js based running on Ubuntu. I also have some special software running on it, so I prefer not to use the many PAAS offering node.js hosting.</p>
  
  <p>Thanks for any hints.</p>