Courseiva
Deployment →hardMultiple Choice

DVA-C02 Deployment Practice Question

A company has a production environment using AWS Elastic Beanstalk with a multi-container Docker platform. The application consists of a PHP web server and a Redis cache, each running in separate containers. The deployment uses a rolling update policy with a batch size of 1. Recently, during deployments, some users experience intermittent 502 Bad Gateway errors for about 30 seconds. The errors occur when the old containers are terminated and new containers are not yet ready to serve traffic. The development team wants to eliminate this downtime without increasing the deployment time significantly. The team has access to modify the Elastic Beanstalk environment configuration and the Dockerrun.aws.json file. Which action should the team take to resolve the issue?

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

✓

Configure a health check grace period in the Elastic Beanstalk environment to delay load balancer registration until the containers are healthy.

Configuring a health check grace period allows new containers time to become healthy before the load balancer routes traffic to them, preventing the 502 errors during the transition. Option A is incorrect because increasing the batch size would cause more containers to be replaced simultaneously, potentially increasing downtime. Option C is incorrect because 'All at once' deployment would terminate all old containers before starting new ones, causing full downtime. Option D is incorrect because reducing the health check interval would make the load balancer check more frequently, which could cause premature routing to unhealthy instances and exacerbate the issue.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Increase the batch size to 2 to reduce the number of deployment cycles.

    Why it's wrong here

    Increasing the batch size in a rolling deployment means more instances are taken out of service concurrently for the update. While this might reduce the total number of deployment cycles, it directly increases the immediate impact on service capacity and the potential for downtime during the deployment window. This approach would exacerbate, rather than mitigate, service interruption.

  • ✓

    Configure a health check grace period in the Elastic Beanstalk environment to delay load balancer registration until the containers are healthy.

    Why this is correct

    Configuring a health check grace period is crucial for allowing newly launched instances or containers sufficient time to fully initialize and pass their application-level health checks. This delay prevents the load balancer from prematurely marking an instance as unhealthy simply because it hasn't completed its startup routine. By doing so, it ensures that traffic is only routed to instances that are genuinely ready to serve requests, thereby maintaining application availability during deployments.

  • ✗

    Change the deployment policy to 'All at once' to complete the deployment faster.

    Why it's wrong here

    The 'All at once' deployment policy updates every instance in the environment simultaneously with the new application version. Although this method can complete the deployment process quickly, it inevitably results in a complete service outage for the entire duration of the update. This strategy is unsuitable for production environments that require continuous availability and zero downtime, as all existing instances are replaced before any new ones are ready.

  • ✗

    Reduce the health check interval on the load balancer to detect healthy instances faster.

    Why it's wrong here

    Reducing the health check interval on the load balancer would cause it to check the health status of instances more frequently. While this might lead to faster detection of *changes* in an instance's health status, it does not address the fundamental problem of instances needing adequate time to become healthy *initially*. A shorter interval would only result in the load balancer marking unready instances as unhealthy even faster, potentially triggering premature instance cycling or routing traffic to an application that is not yet fully operational.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 DVA-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 DVA-C02 exam.