SAP-C02 practice question 3 of 35
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…
Full set: 689 questionsDomain Design Solutions for Organizational Complexity
The solution must address scaling for both the stateful application tier and the database tier.
1. Stateful Application Tier: The application is stateful, meaning user session data is stored on the specific EC2 instance they are connected to. To ensure a consistent user experience as the application scales horizontally with an Auto Scaling group, the load balancer must direct all requests from a user's session to the same instance. An Application Load Balancer (ALB) with sticky sessions (session affinity) enabled is the standard and most effective way to achieve this for web applications.
2. Database Tier: Amazon Aurora has a single writer instance and can have multiple read replicas. To scale database read capacity, which is common for web applications, you add more read replicas. Aurora Auto Scaling is a feature specifically designed to automatically adjust the number of Aurora Replicas based on performance metrics like CPU utilization, thus scaling the database's read throughput. You cannot "auto scale" the number of writer instances. Therefore, combining an ALB with sticky sessions for the application and Aurora Auto Scaling for the read replicas provides a complete, scalable, and consistent solution.
A: A Network Load Balancer (NLB) does not support the "least outstanding requests" routing algorithm; it uses a flow hash algorithm. While it supports sticky sessions, an ALB is generally better suited for HTTP/HTTPS web traffic. B: "Aurora Auto Scaling for Aurora writers" is incorrect. An Aurora cluster has only one writer instance. Scaling the writer is a vertical scaling operation (changing instance size), not an auto-scaling of the instance count. D: This option is incorrect for two reasons: it incorrectly suggests auto-scaling Aurora writers, and it incorrectly pairs the "least outstanding requests" algorithm with a Network Load Balancer.
1. AWS Documentation - Elastic Load Balancing
Application Load Balancers: "Sticky sessions are a mechanism to route requests from the same client to the same target. Elastic Load Balancing supports sticky sessions for Application Load Balancers." (Source: AWS Documentation
User Guide for Application Load Balancers
section on "Sticky sessions").
2. AWS Documentation - Amazon Aurora: "With Aurora Auto Scaling
you can have Amazon Aurora automatically adjust the number of Aurora Replicas in an Aurora DB cluster... Aurora Auto Scaling is useful for workloads that have predictable cyclical traffic patterns or unpredictable traffic spikes." (Source: AWS Documentation
Amazon Aurora User Guide
section on "Using Amazon Aurora Auto Scaling with Aurora replicas").
3. AWS Documentation - Amazon Aurora Architecture: "Every Aurora DB cluster has one primary DB instance [writer]... An Aurora DB cluster can also have up to 15 Aurora Replicas... Aurora Replicas are used for read scaling." (Source: AWS Documentation
Amazon Aurora User Guide
section on "Amazon Aurora DB clusters").
4. AWS Documentation - Elastic Load Balancing
Network Load Balancers: "The load balancer routes each request to a single target in a target group. The routing algorithm it uses is a flow hash algorithm." (Source: AWS Documentation
User Guide for Network Load Balancers
section on "Routing").
Keep practicing
Take the free SAP-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other SAP-C02 practice questions
- Question 1A company runs an application in (he cloud that consists of a database and a website User…
- Question 2A company wants to migrate an Amazon Aurora MySQL DB cluster from an existing AWS account…
- Question 4A company is running a critical stateful web application on two Linux Amazon EC2 instance…
- Question 5A company plans to migrate a legacy on-premises application to AWS. The application is a …
- Question 6A company needs to migrate an on-premises SFTP site to AWS. The SFTP site currently runs …
- Question 7An education company is running a web application used by college students around the wor…
