Bonton255
Bonton255

Reputation: 2419

Custom ELB Routing

I want to be able to route requests to my EC2 instances via AWS ELB using a custom strategy. Is that possible using the Classic or the Application Load Balancer?

For example, the application running on each of the EC2 instances will be emitting metrics related to the work it is doing. I want the ELB routing to happen based on this metric - route the request to the host reporting the smallest amount of the metric.

This metric has nothing to do with the CPU/Memory. It also cannot be differentiated based on the request.

Upvotes: 0

Views: 251

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269520

No, this is not possible.

From How Elastic Load Balancing Works:

Routing Algorithm

With a Classic Load Balancer, the load balancer node that receives the request selects a registered instance using the round robin routing algorithm for TCP listeners and the least outstanding requests routing algorithm for HTTP and HTTPS listeners.

With an Application Load Balancer, the load balancer node that receives the request evaluates the listener rules in priority order to determine which rule to apply, and then selects a target from the target group for the rule action using the round robin routing algorithm. Routing is performed independently for each target group, even when a target is registered with multiple target groups.

Upvotes: 1

Related Questions