Skip to Content

Amazon AWS Certified Solutions Architect – Professional SAP-C02 Exam Question & Answer: How to deploy same version of business logic during testing?

Question

A company is running an application in the AWS Cloud. The core business logic is running on a set of Amazon EC2 instances in an Auto Scaling group. An Application Load Balancer (ALB) distributes traffic to the EC2 instances. Amazon Route 53 record api.example.com is pointing to the ALB.

The company’s development team makes major updates to the business logic. The company has a rule that when changes are deployed, only 10% of customers can receive the new logic during a testing window. A customer must use the same version of the business logic during the testing window.

How should the company deploy the updates to meet these requirements?

A. Create a second ALB, and deploy the new logic to a set of EC2 instances in a new Auto Scaling group. Configure the ALB to distribute traffic to the EC2 instances. Update the Route 53 record to use weighted routing, and point the record to both of the ALBs.
B. Create a second target group that is referenced by the ALDeploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.
C. Create a new launch configuration for the Auto Scaling group. Specify the launch configuration to use the AutoScalingRollingUpdate policy, and set the MaxBatchSize option to 10. Replace the launch configuration on the Auto Scaling group. Deploy the changes.
D. Create a second Auto Scaling group that is referenced by the ALB. Deploy the new logic on a set of EC2 instances in this new Auto Scaling group. Change the ALB routing algorithm to least outstanding requests (LOR). Configure ALB session stickiness.

Answer

B. Create a second target group that is referenced by the ALDeploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

Explanation 1

The company should deploy the updates using Option B.

Here’s why:

Option B: The company can create a second target group that is referenced by the ALB. The new logic can be deployed to EC2 instances in this new target group. The ALB listener rule can be updated to use weighted target groups. ALB target group stickiness can be configured to ensure that a customer uses the same version of the business logic during the testing window.

Explanation 2

B. Create a second target group that is referenced by the ALB. Deploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

In order to meet the requirements of deploying updates to only 10% of customers and ensuring that a customer uses the same version of the business logic during the testing window, it is essential to use Application Load Balancer’s (ALB) weighted target groups and target group stickiness features.

Here is a step-by-step explanation of the solution:

  1. Create a second target group that is referenced by the ALB. This new target group will have the updated business logic deployed on a set of EC2 instances.
  2. Deploy the new logic to the EC2 instances in the new target group. This ensures that the updated business logic is available for a portion of the customers.
  3. Update the ALB listener rule to use weighted target groups. This allows you to configure the ALB to distribute the traffic between the two target groups (old and updated logic) based on the specified weights. For example, you can set the weight of the new target group to 10% and the weight of the old target group to 90%. This ensures that only 10% of the customers receive the updated logic during the testing window.
  4. Configure ALB target group stickiness. This ensures that a customer continues to use the same version of the business logic until the end of the testing window. Stickiness is achieved by using cookies to track the user’s session and directing them to the same target group throughout their session.

By following these steps, the company can deploy the updates as per their requirements and ensure that only 10% of customers receive the new logic during the testing window while keeping the customer’s experience consistent.

Explanation 3

To meet the company’s requirements, you can use Option B.

You can create a second target group that is referenced by the ALB. Deploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness².

This way, you can ensure that only 10% of customers receive the new logic during a testing window. A customer must use the same version of the business logic during the testing window.

Explanation 4

The correct answer is B. Create a second target group that is referenced by the ALB. Deploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

This approach will allow the company to deploy the new logic to a subset of customers while keeping the rest of the customers on the old logic. This can be done by creating a second target group in the ALB and deploying the new logic to the EC2 instances in this target group. The ALB listener rule can then be updated to use weighted target groups, which will cause the ALB to distribute traffic to the two target groups in proportion to the weight that is assigned to each target group. Finally, ALB target group stickiness can be configured to ensure that each customer is always routed to the same target group.

This approach has several advantages over the other approaches. First, it is the simplest approach to implement. Second, it is the most efficient approach, as it does not require the company to create a new Auto Scaling group or Route 53 record. Third, it is the most reliable approach, as it does not require the company to change the routing algorithm of the ALB.

Here are the steps involved in deploying the updates using this approach:

  1. Create a second target group in the ALB.
  2. Deploy the new logic to the EC2 instances in this target group.
  3. Update the ALB listener rule to use weighted target groups.
  4. Configure ALB target group stickiness.

Once these steps are complete, the company can begin routing traffic to the new target group. The company can then monitor the performance of the new logic and make adjustments as needed.

Explanation 5

The question you asked is about how to deploy major updates to the business logic of an application that runs on a set of EC2 instances in an Auto Scaling group behind an ALB. The company has a rule that when changes are deployed, only 10% of customers can receive the new logic during a testing window. A customer must use the same version of the business logic during the testing window. The solution that will meet these requirements is B. Create a second target group that is referenced by the ALDeploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

A target group is a logical grouping of targets such as EC2 instances that can be registered with a load balancer. You can create one or more target groups for your load balancer depending on your application needs. You can also specify health checks for each target group to monitor the health and availability of your targets.

A weighted target group is a feature of ALB that allows you to associate multiple target groups with a single listener rule and assign weights to each target group. The weights determine how much traffic is routed to each target group. You can use weighted target groups to perform blue/green deployments or canary testing for your application by routing different proportions of traffic to different versions of your application code.

ALB target group stickiness is a feature of ALB that enables the load balancer to bind a user’s session to a specific target in a target group. This ensures that all requests from the user during the session are sent to the same target. You can use ALB target group stickiness to ensure that a customer uses the same version of the business logic during the testing window.

The other options are not correct because:

A. Create a second ALB, and deploy the new logic to a set of EC2 instances in a new Auto Scaling group. Configure the ALB to distribute traffic to the EC2 instances. Update the Route 53 record to use weighted routing, and point the record to both of the ALBs. This option is not correct because it does not leverage the benefits of using weighted target groups for performing blue/green deployments or canary testing for your application. Using a second ALB would increase the operational overhead and cost of managing and monitoring two load balancers instead of one. Using Route 53 weighted routing would also not guarantee that a customer uses the same version of the business logic during the testing window as it depends on DNS caching and propagation.

C. Create a new launch configuration for the Auto Scaling group. Specify the launch configuration to use the AutoScalingRollingUpdate policy, and set the MaxBatchSize option to 10. Replace the launch configuration on the Auto Scaling group. Deploy the changes. This option is not correct because it does not meet the requirement of allowing only 10% of customers to receive the new logic during a testing window. Using a new launch configuration with an AutoScalingRollingUpdate policy would replace all instances in your Auto Scaling group with new instances that have the updated application code. Setting the MaxBatchSize option to 10 would only control how many instances are replaced at a time, not how much traffic is routed to them.

D. Create a second Auto Scaling group that is referenced by the ALB. Deploy the new logic on a set of EC2 instances in this new Auto Scaling group. Change the ALB routing algorithm to least outstanding requests (LOR). Configure ALB session stickiness. This option is not correct because it does not leverage the benefits of using weighted target groups for performing blue/green deployments or canary testing for your application. Using a second Auto Scaling group would increase the operational overhead and cost of managing and scaling two groups instead of one. Changing the ALB routing algorithm to LOR would not guarantee that only 10% of customers receive the new logic during a testing window as it depends on factors such as request processing time and network latency.

Explanation 6

The correct answer is A. Create a second ALB, and deploy the new logic to a set of EC2 instances in a new Auto Scaling group. Configure the ALB to distribute traffic to the EC2 instances. Update the Route 53 record to use weighted routing, and point the record to both of the ALBs.

This solution will allow the company to deploy the updates to 10% of their customers while keeping the other 90% of their customers on the old version of the business logic. The new ALB will be configured to distribute traffic to the new EC2 instances. The Route 53 record will be updated to use weighted routing, and will point to both of the ALBs. This will allow the company to control the percentage of traffic that is sent to each ALB.

Here are some additional details about each of the steps in this solution:

  • Create a second ALB: The new ALB will be used to distribute traffic to the new EC2 instances. The new ALB will be configured to use the same listener rules as the old ALB. This will ensure that all of the traffic that is sent to the new ALB will be routed to the new EC2 instances.
  • Deploy the new logic to a set of EC2 instances in a new Auto Scaling group: The new EC2 instances will be launched with the new version of the business logic. The new EC2 instances will be added to the new Auto Scaling group. The new Auto Scaling group will be configured to scale up or down as needed to meet the demand for the new version of the business logic.
  • Update the Route 53 record to use weighted routing: The Route 53 record will be updated to use weighted routing. This will allow the company to control the percentage of traffic that is sent to each ALB. The company can start by sending 10% of the traffic to the new ALB and 90% of the traffic to the old ALB. The company can then increase the percentage of traffic that is sent to the new ALB as they are confident that the new version of the business logic is working properly.
  • Point the record to both of the ALBs: The Route 53 record will be updated to point to both of the ALBs. This will allow the company to test the new version of the business logic with a small percentage of their customers before rolling it out to all of their customers.

This solution will allow the company to deploy the updates to their application in a safe and controlled manner. The company will be able to test the new version of the business logic with a small percentage of their customers before rolling it out to all of their customers. This will help to ensure that the new version of the business logic is working properly and that it does not cause any problems for their customers.

Explanation 7

To meet the requirements of deploying updates to the application while limiting the testing window to only 10% of customers and ensuring that each customer uses the same version of the business logic, the company should follow the approach described in option B:

B. Create a second target group that is referenced by the ALB. Deploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

1. Create a second target group: Set up a new target group within the existing ALB. This target group will be used to deploy the new version of the business logic.

2. Deploy the new logic: Launch EC2 instances with the updated version of the business logic and associate them with the new target group. These instances will serve the new logic while the existing instances will continue to serve the previous version.

3. Update ALB listener rule: Modify the ALB listener rule to use weighted target groups. This allows traffic to be distributed between the old target group (containing the existing instances) and the new target group (containing the instances with the updated logic).

4. Configure ALB target group stickiness: Enable stickiness for the ALB target groups. Stickiness ensures that once a customer is assigned to a specific target group (representing a specific version of the business logic), subsequent requests from the same customer will be routed to the same target group. This guarantees that each customer uses the same version of the business logic during the testing window.

By following this approach, the company can gradually roll out the updated logic to only 10% of customers (by adjusting the weights in the target group configuration), while the remaining 90% continue to use the previous logic. This allows for controlled testing and ensures that each customer maintains consistency in their experience by using the same logic version during the testing window.

Explanation 8

The correct answer is B. Create a second target group that is referenced by the ALB. Deploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

Here are the steps involved:

  1. Create a second target group.
  2. Deploy the new logic to EC2 instances in this new target group.
  3. Update the ALB listener rule to use weighted target groups.
  4. Configure ALB target group stickiness.

This approach will allow the company to deploy the updates to only 10% of customers during the testing window. Customers will continue to use the same version of the business logic until the testing window is complete.

Here are some additional details about each of these steps:

1. Create a second target group.

A target group is a logical grouping of EC2 instances that are eligible to receive traffic from an ALB. By creating a second target group, the company can deploy the new logic to a separate set of EC2 instances.

2. Deploy the new logic to EC2 instances in this new target group.

The company can deploy the new logic to EC2 instances in the new target group using any method they choose. For example, they could use a deployment tool like AWS CodeDeploy or they could manually deploy the changes.

3. Update the ALB listener rule to use weighted target groups.

An ALB listener rule defines how traffic is distributed to target groups. By updating the ALB listener rule to use weighted target groups, the company can control the percentage of traffic that is sent to each target group.

4. Configure ALB target group stickiness.

ALB target group stickiness ensures that a client is always directed to the same EC2 instance within a target group. This can be useful for applications that require sessions to be maintained across multiple requests.

Explanation 9

B. Create a second target group that is referenced by the ALB. Deploy the new logic to EC2 instances in this new target group. Update the ALB listener rule to use weighted target groups. Configure ALB target group stickiness.

To meet the requirement of only allowing 10% of customers to receive the new logic during the testing window, and ensuring that a customer must use the same version of the business logic during the testing window, the best approach is to use Application Load Balancer’s weighted target groups feature.

Here’s how the solution works:

1. Create a second target group (TG2) that is referenced by the Application Load Balancer (ALB). This will host the updated business logic, while the first target group (TG1) will continue to host the existing business logic.

2. Deploy the new logic to a set of EC2 instances in the new target group (TG2). This will ensure that the updated business logic is available to the selected customers.

3. Update the ALB listener rule to use weighted target groups. This allows you to control the percentage of traffic that is forwarded to each target group. In this case, you will set the weight for TG1 (existing logic) to 90, and the weight for TG2 (updated logic) to 10. This ensures that 10% of customers will receive the new logic during the testing window.

4. Configure ALB target group stickiness. This ensures that a customer will continue to use the same version of the business logic during the testing window. Stickiness is achieved by the ALB using cookies to bind a user’s session to a specific target group. This way, a user will consistently be routed to the same target group and receive the same version of the business logic during their session.

By following these steps, the company can effectively deploy the updates while adhering to their rule of only allowing 10% of customers to receive the new logic during the testing window and ensuring that a customer uses the same version of the business logic during the testing window.

Reference

Amazon AWS Certified Solutions Architect – Professional SAP-C02 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Solutions Architect – Professional SAP-C02 exam and earn Amazon AWS Certified Solutions Architect – Professional SAP-C02 certification.

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that\'s committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we haven\'t implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you\'re currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.