Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

A company runs a web application where requests to /api/* should be routed to one group of EC2 instances and requests to /images/* should be routed to another group. Which AWS load balancer type supports this URL path-based routing?

⚠ Common exam trap

Test-takers frequently confuse the Layer 4 capabilities of NLB with Layer 7 routing features, mistakenly thinking NLB can handle URL-based routing because it supports TLS termination, but NLB cannot inspect HTTP path patterns.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Application Load Balancer (ALB)

The Application Load Balancer (ALB) operates at Layer 7 (HTTP/HTTPS) and supports content-based routing, including path-based routing rules that direct requests to different target groups based on URL paths such as /api/* and /images/*. This makes ALB the correct choice for the described use case.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Network Load Balancer (NLB)

    Why it's wrong here

    The Network Load Balancer is a Layer 4 load balancer that makes forwarding decisions solely from TCP/UDP protocol headers, including source and destination IP addresses and ports. It does not terminate or interpret HTTP messages, so it has no access to the request URI or path after the server name. Since path-based routing requires reading the HTTP URL path to select different target groups, an NLB cannot evaluate conditions such as /api/* or /images/*. It is best suited for extreme performance and preservation of client IP addresses at the connection level.

  • Classic Load Balancer (CLB)

    Why it's wrong here

    Classic Load Balancer is the legacy load balancer that supports both TCP and HTTP listeners, but its HTTP features are rudimentary; each listener sends all requests to a single registered backend pool. It lacks the Listener Rules construct found in ALB, which is required to inspect the URL path and route to different backend services. Path-based routing to separate target groups is simply not a feature of CLB, so you would need multiple load balancers or an additional reverse proxy to split /api and /images traffic. AWS now recommends ALB for all Layer 7 routing needs.

  • Gateway Load Balancer (GWLB)

    Why it's wrong here

    Gateway Load Balancer operates at Layer 3 and is intended for transparently forwarding traffic to and from third-party virtual appliances like firewalls, IDS, and IPS systems. It encapsulates IP packets using the GENEVE protocol and does not perform HTTP proxy duties, meaning it cannot inspect URI paths or application headers. While it can help scale packets to security appliances, it lacks any application-aware routing capability and therefore cannot route based on path patterns. Its forwarding is based on packet metadata and appliance endpoints, not HTTP content.

  • Application Load Balancer (ALB)

    Why this is correct

    ALB operates at Layer 7 and supports rule-based routing based on URL path, host header, HTTP headers, and query strings. Routing /api/* to one target group and /images/* to another is a standard ALB path-based routing configuration.

About these practice questions

Courseiva writes every CLF-C02 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CLF-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CLF-C02 exam.