Q33 — AWS SAA-C03 Ch.16
Question 33 of 100 | ← Chapter 16
Q1233. A company is running a two-tier web-based application in an on-premises data center. The application layer consists of a single server running a stateful application.The application connects to a PostgreSQL database running on a separate server.The application's user base is expected to grow significantly,so the company is migrating the application and database to AWS.The solution will use Amazon Aurora PostgreSQL,Amazon EC2 Auto Scaling,and Elastic Load Balancing. Which solution will provide a consistent user experience that will allow the application and database tiers to scale?
- A. Enable Aurora Auto Scaling for Aurora Replicas. Use a Network Load Balancer with the least outstanding requests routing algorithm and sticky sessions enabled.
- B. Enable Aurora Auto Scaling for Aurora writers. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled.
- C. Enable Aurora Auto Scaling for Aurora Replicas. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled. ✓
- D. Enable Aurora Auto Scaling for Aurora writers. Use a Network Load Balancer with the least outstanding requests routing algorithm and sticky sessions enabled.
Correct Answer: C. Enable Aurora Auto Scaling for Aurora Replicas. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled.
Explanation
To provide a consistent user experience while allowing the application and database tiers to scale as the user base grows, let's analyze the requirements and the options:Key Requirements:Scalability: Both the application and database tiers must be able to scale to handle increased load. Consistent User Experience: The solution should ensure that user sessions are maintained (sticky sessions) and that requests are distributed efficiently across the application servers. Database Scaling: Aurora PostgreSQL should be configured to scale read replicas to handle read-heavy workloads.Solution Analysis:Database Tier (Amazon Aurora PostgreSQL):Aurora Auto Scaling: This should be enabled for Aurora Replicas (read replicas) to automatically scale the number of read replicas based on demand. Scaling the writer instance is not typically necessary for read- heavy scaling scenarios.Application Tier (Amazon EC2 Auto Scaling + Elastic Load Balancing):Load Balancer Type:Application Load Balancer (ALB): Best for HTTP/HTTPS traffic, supports advanced routing (e.g., round robin, least connections), and sticky sessions.Network Load Balancer (NLB): Best for TCP/UDP traffic, supports high throughput and low latency, but does not support sticky sessions for HTTP/HTTPS at the application layer.Routing Algorithm:Round Robin: Distributes requests evenly across all healthy instances. Least Outstanding Requests: Not a standard routing algorithm for ALB or NLB (though NLB supports "least connections" for TCP).Sticky Sessions: Required to ensure that a user's requests are directed to the same application server for the duration of their session, which is important for stateful applications.Evaluating the Options:Option A: Enable Aurora Auto Scaling for Aurora Replicas. Use a Network Load Balancer with the least outstanding requests routing algorithm and sticky sessions enabled. Incorrect: NLB does not support sticky sessions for HTTP/HTTPS traffic, and "least outstanding requests" is not a valid routing algorithm for NLB (it supports "least connections" for TCP). Option B: Enable Aurora Auto Scaling for Aurora writers. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled.Incorrect: Scaling the Aurora writer instance is not the correct approach for read-heavy scaling. Aurora Auto Scaling should be enabled for read replicas, not the writer. Option C: Enable Aurora Auto Scaling for Aurora Replicas. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled. Correct: This option enables Aurora Auto Scaling for read replicas (correct for read-heavy scaling), uses an ALB (which supports sticky sessions and HTTP/HTTPS traffic), and uses the round robin routing algorithm (which is suitable for even distribution of requests).Option D: Enable Aurora Auto Scaling for Aurora writers. Use a Network Load Balancer with the least outstanding requests routing algorithm and sticky sessions enabled. Incorrect: Similar to Option B, scaling the Aurora writer instance is not the correct approach for read-heavy scaling. Additionally, NLB does not support sticky sessions for HTTP/HTTPS traffic.Final Answer:C. Enable Aurora Auto Scaling for Aurora Replicas. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled.This solution ensures that the database tier scales read replicas to handle increased load, and the application tier uses an ALB to distribute requests evenly while maintaining user sessions (sticky sessions).