title: Limit number of connections to instances with AWS ELB
body: <p>We are using AWS classic ELB for our service and our service can only serve x number of requests at a time. If the number of requests are greater than x then we do not want to route those requests to the instance and neither do we want to lose those requests. We would like to limit the number of connections to the instances registered with the ELB. Is there some ELB setting to configure max connections to instances? </p>
  
  <p>Another solution I could find was to use ELB connection draining but based on the ELB doc <strong>[1]</strong> , using connection draining will mark the instance as OutofService after serving in-flight requests. Does that mean the instance will be terminated and de-registered from ELB after in-flight requests are served? We do not want to terminate and de-register the instances, we just want to limit the number of connections to the instances. Any solutions?</p>
  
  <p><strong>[1</strong>] <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html</a></p>