Limit number of connections to instances with AWS ELB

YBathia

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?

Another solution I could find was to use ELB connection draining but based on the ELB doc [1] , 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?

[1] http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html

Chris White

ELB is more meant to spread traffic evenly across instances registered for it. If you have more traffic, you throw up more instances to deal with it. This is generally why a load balancer is matched with an auto scaling group. The Auto Scaling Group will look at set constraints and based on that either spins up more instances or pulls them down (ie. your traffic starts to slow down).

Connection draining is more meant for pulling traffic from bad instances so it doesn't get lost. Bad instances mean they aren't passing health checks because something on the instance is broken. ELB by itself doesn't terminate instances, that's another part of what the Auto Scaling Group is meant to do (basically terminate the bad instance and spin up a new instance to replace it). All ELB does is stop sending traffic to it.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

nmcli: limit number of active connections

AWS ELB dropping the connections. Need to keep it alive

work with AWS ELB to keep websocket connections during server restarting?

Allow HTTP Access to AWS instances only through ELB

AWS ELB with EC2 instances in different regions

Can we control traffic routing to instances on AWS ELB with code

Limit number of simultaneous connections to same user account

Spring Boot - Limit on number of connections created

How to limit the number of simultaneous connections in Twisted

Limit number of connections per second in Apache HttpClient

Is there a way to limit the number of File Handler instances?

Is there a limit to the number of THREE.WebGLRenderer instances in a page?

Is it possible to limit the number of instances of a class at compile time?

Does AWS VPC endpoint has limit of connections to the target AWS resource?

AWS SNS number of topics limit

ELB with Multiple ENI Instances

AWS - Load balancing for ECS service with hard connections limit per container

Limit max number of connections coming from a specific IP address

How to limit the number of connections to a socket and trigger timeout on client (Python)

How do I limit the number of connections Jetty will accept?

IPtables : Limit number of new ssh connections per minute

IPtables : Limit number of new ssh connections per minute

Does running under local IIS limit the number of Signalr connections

List the number of running instances in an AWS region

adding two different groups of ec2 instances to aws_elb

Limit number of instances of an azure webjob when scaling out

AWS batch limit number of container on single host

AWS batch - how to limit number of concurrent jobs

Why its 0.0 ELB instances?