HTTP Header Based Routing

Application Load Balancer can route requests to different target groups based on different HTTP

Use Cases:

There are many cases where you might want to route different end users to different target groups, which serve different contents. For example, you might want to serve mobile users with low resolution video and desktop users with high resolution video. Similarly, you might need to have a target group to serve requests from some legacy clients. In this demo, we use HTTP User-Agent header to make the Application Load Balancer route requests to different targets. If you access the page from different browsers. You will see different web pages.

How does this demo work?

1. When you click the button, a HTTP request is sent to the "exampleloadbalancer" Application Load Balancer with the User-Agent information of your browser.

2. There are four routing rules configured on the Application Load Balancer which route request to different target groups based on the User-Agent header (Chrome, Firefox, Safari, IE and Edge).

3. You will see different pages served by the Application Load Balancer when you access the page from the browsers listed above.

4. For each evaluation in a condition, a successful match occurs if the header value matches the match string that is provided as an input including any wildcards in the match string.

5. As you can see from the rule configuration, wildcard “*” (matches 0 or more characters) or a wildcard “?” (matches exactly one character) are supported

Try to click this button from different browsers