ALB Listeners, Rules, and ECS
Get an overview of ALB Listeners, Rules, and ECS.
We'll cover the following
Listeners and rules
Listeners
- Each ALB needs at least one listener and can have up to 10.
- Listeners define the port and protocol to listen on.
- You can add one or more listeners.
- You cannot have the same port in multiple listeners.
Listener rules
- Rules determine how the load balancer routes requests to the targets in one or more target groups.
- Each rule consists of a priority, one or more actions, an optional host condition, and an optional path condition.
- Only one action can be configured per rule.
- One or more rules are required.
- Each listener has a default rule and you can optionally define up to 100 additional rules per ALB.
- Rules determine what action is taken when the rule matches the client’s request.
- Rules are defined on listeners.
- You can add rules that specify different target groups based on the content of the request (content-based routing).
- If no rules are found, the default rule will be followed, which directs traffic to the default target groups.
The image below shows a ruleset with a host-based and path-based entry and a default rule at the end:
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.