mediumMultiple SelectObjective-mapped
Google ACE Practice Question: Deploying a stateless web application on Compute…
A company is deploying a stateless web application on Compute Engine. The application is served by a managed instance group with autoscaling behind an HTTP(S) load balancer. To minimize instance startup time and ensure that the application is ready to serve traffic as soon as an instance is created, which two steps should the company take? (Choose two.)
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
✓
Use a container-optimized OS and deploy the application as a Docker container via the startup script.
(container-optimized OS) enables the application to run as a Docker container, which starts quickly if the image is cached, minimizing instance startup time. Option E (custom machine image) includes the application and all dependencies, eliminating the need to install them at boot. Option A (increasing health check delay) delays traffic serving, not startup time. Option B (startup script) adds installation time. Option C (autohealing) addresses health, not startup time.
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 initial delay for the load balancer health check to 5 minutes.
Why it's wrong here
Increasing the initial delay (initialDelaySec) on the load balancer health check tells Cloud Load Balancing to wait 5 minutes before it first probes the instance; during that entire grace period the LB will not mark the instance healthy, so the instance will not serve traffic. This does not shorten the application's boot time; it only postpones the moment traffic is routed, making apparent startup time worse.
- ✗
Configure a startup script in the instance template that installs dependencies and starts the application.
Why it's wrong here
Running a startup script in the instance template that installs dependencies and starts the application moves package installation and configuration into the boot path. Each new VM must execute apt-get, pip install, or other network-dependent commands, which adds tens of seconds or minutes before the app can listen on its port. This approach increases, not reduces, startup time compared with baking dependencies into the image.
- ✗
Set the managed instance group's autohealing to replace unhealthy instances based on the load balancer health check.
Why it's wrong here
Configuring managed instance group autohealing to replace instances that fail the load balancer health check improves availability by automatically recreating unhealthy VMs, but autohealing does nothing to speed up a single instance's boot-to-ready time. When a replacement is created, it still has to go through the same slow boot, container pull, or startup-script process before it can pass the health check and receive traffic.
- ✓
Use a container-optimized OS and deploy the application as a Docker container via the startup script.
Why this is correct
Container-Optimized OS is a minimal, hardened Linux distribution from Google that boots very quickly and is preconfigured to run Docker containers. If the container image is already cached on the boot disk or in a nearby registry, the startup script can simply run docker start or docker run, launching the application and its dependencies in seconds and eliminating per-instance package installation.
- ✓
Create a custom machine image that includes the application and all dependencies.
Why this is correct
Creating a custom machine image with the application and all dependencies already baked into the boot disk means new instances start with the software in place; after the VM boots, the app can begin serving immediately, without running installers or download scripts. This is a classic fast-start practice for stateless workloads because it removes the variability and delay of installing at instance creation time, though the image itself must be updated when the app changes.
Go deeper
Related to this question
Learn chapter
Google Compute Engine
Key term
Managed instance group
A managed instance group is a collection of identical virtual machine instances that are automatically managed as a single unit to ensure high availability and scalability.
Key term
HTTP(S) Load Balancer
A network device or software that distributes incoming web traffic across multiple servers using HTTP or HTTPS protocols to ensure high availability, reliability, and performance.
About these practice questions
One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud 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 ACE exam.