Answer: C
Option A is incorrect. While it is possible to provide a public DNS URL or a public IP address of your site to a user, it is not the best practice for several reasons.
It will be inefficient & cumbersome having the users to know many URL’s or IP addresses as the number of applications increase.
Load distribution will not be possible with this scenario resulting in possible Single Point of Failures & unacceptable application performance as the load increases.
High Availability & failover will not be possible since we are exposing a static IP address or URL.
Option B is incorrect. Classic Load Balancer provides basic load balancing capabilities that will distribute traffic equally among many servers under it.
Option C is CORRECT. Application Load Balancer supports a feature named Path-based routing that will route requests based on URL patterns provided in the request. Application Load Balancer achieves this feature by using Target groups that hold a specific set of resources. EC2 instances, Auto Scaling groups, ECS tasks etc. It is the responsibility of the Target group which keeps track of the instances of that particular class and intelligently route requests based on the load within a specific group.
Option D is incorrect. Network Load balancers distribute load based on network variables like IP address, destination ports. It is layer 4 (TCP) and below and is not designed to take into consideration anything at the application layer such as content type, cookie data, custom headers, user location, or the application behavior. So Network Load balancer cannot ensure the availability of applications.
Diagram:
As seen in the diagram below, the Application Load Balancer acts as a single point of entry to various applications hosted on a website. Based on the URL pattern, e.g., www.example.com/orders, the ALB will route the request based on the Path to a specific Target Group hosting the application. In this case, the Orders Auto Scaling group will be held by the ALB’s Target Group. Within the Auto Scaling group, the ALB will intelligently route the request to different server instances depending on the load.
References:
https://youtu.be/-hFAWk6hyZA
https://aws.amazon.com/elasticloadbalancing/#:~:text=Elastic%20Load%20Balancing%20automatically%20distributes,or%20across%20multiple%20Availability%20Zones.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html
https://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html