Bird
Raised Fist0
GCPcloud~20 mins

High availability configuration in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
High Availability Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Architecture
intermediate
2:00remaining
Designing a multi-region high availability setup

You want to design a high availability architecture for a web application on Google Cloud Platform. Which setup ensures the application remains available even if an entire region fails?

ADeploy the application in multiple zones within a single region without load balancing.
BDeploy the application in a single region with multiple zones and use a regional load balancer.
CDeploy the application in multiple regions with global load balancing and health checks.
DDeploy the application in a single zone with autoscaling and use a zonal load balancer.
Attempts:
2 left
💡 Hint

Think about what happens if a whole region goes down. Which option covers multiple regions?

❓ Configuration
intermediate
2:00remaining
Configuring Cloud SQL for high availability

You want to configure a Cloud SQL instance for high availability. Which configuration option correctly enables automatic failover?

ACreate a primary instance with a failover replica in a different zone and enable high availability.
BCreate multiple read replicas in the same zone without failover enabled.
CCreate a single primary instance without replicas and enable backups.
DCreate a primary instance and manually switch to a backup instance when needed.
Attempts:
2 left
💡 Hint

Automatic failover requires a failover replica in a different zone and enabling HA.

❓ security
advanced
2:00remaining
Securing a multi-region high availability setup

In a multi-region high availability setup, which practice best protects your application from unauthorized access while maintaining availability?

AUse a single firewall rule allowing all traffic to all regions.
BDisable all firewalls and rely on network peering for security.
CUse a VPN connection only to one region and allow open access elsewhere.
DUse Identity-Aware Proxy (IAP) with global load balancers and enforce least privilege IAM roles.
Attempts:
2 left
💡 Hint

Think about controlling access securely and limiting permissions.

❓ service_behavior
advanced
2:00remaining
Behavior of global load balancer during regional failure

What happens to user traffic when a Google Cloud global HTTP(S) load balancer detects that the primary region is down?

ATraffic is automatically routed to healthy backend instances in other regions without user impact.
BTraffic continues to be sent to the primary region until manually rerouted.
CTraffic is dropped until the primary region recovers.
DTraffic is routed randomly to any backend regardless of health status.
Attempts:
2 left
💡 Hint

Global load balancers monitor backend health and reroute traffic automatically.

✅ Best Practice
expert
2:00remaining
Optimizing database replication for high availability and latency

You have a multi-region application with a Cloud Spanner database. To optimize for both high availability and low latency, which configuration is best?

AUse a single regional instance with synchronous replication to a failover region.
BUse a multi-region instance with replicas distributed across regions and configure read-write transactions to the closest region.
CUse multiple independent regional instances without replication and synchronize data manually.
DUse a single regional instance with asynchronous replication to multiple regions.
Attempts:
2 left
💡 Hint

Consider how Cloud Spanner handles replication and latency across regions.

Practice

(1/5)
1. What is the main purpose of configuring high availability in a cloud service?
easy
A. To make the service run faster for a single user
B. To reduce the cost of running the service
C. To limit the number of users accessing the service
D. To keep the service running even if some parts fail

Solution

  1. Step 1: Understand high availability concept

    High availability means the system stays up and working even if some components fail.
  2. Step 2: Identify the main goal

    The goal is to avoid downtime and keep the service accessible to users.
  3. Final Answer:

    To keep the service running even if some parts fail -> Option D
  4. Quick Check:

    High availability = service stays running despite failures [OK]
Hint: High availability means no downtime during failures [OK]
Common Mistakes:
  • Confusing high availability with cost reduction
  • Thinking it only improves speed for one user
  • Assuming it limits user access
2. Which GCP resource helps automatically replace unhealthy VM instances to maintain high availability?
easy
A. Managed Instance Group with health checks
B. Cloud Storage Bucket
C. Cloud SQL instance
D. Cloud Functions

Solution

  1. Step 1: Identify resource for auto healing

    Managed Instance Groups (MIGs) can use health checks to detect unhealthy VMs.
  2. Step 2: Understand auto replacement

    MIGs automatically recreate unhealthy instances to keep the service healthy.
  3. Final Answer:

    Managed Instance Group with health checks -> Option A
  4. Quick Check:

    Auto replace unhealthy VMs = Managed Instance Group + health checks [OK]
Hint: Auto healing uses Managed Instance Groups with health checks [OK]
Common Mistakes:
  • Choosing storage or database services instead of compute
  • Confusing Cloud Functions with VM management
  • Ignoring health checks role
3. Consider a Managed Instance Group spread across two zones with health checks enabled. If one zone fails completely, what happens to the instances?
medium
A. Instances in the failed zone are replaced in the same zone
B. Instances in the failed zone remain down until manual restart
C. Instances in the failed zone are replaced in the other zone
D. All instances in both zones are shut down

Solution

  1. Step 1: Understand multi-zone MIG behavior

    MIGs spread instances across zones for fault tolerance.
  2. Step 2: Analyze failure impact

    If one zone fails, MIG recreates instances in healthy zones to maintain capacity.
  3. Final Answer:

    Instances in the failed zone are replaced in the other zone -> Option C
  4. Quick Check:

    Zone failure triggers instance replacement in healthy zones [OK]
Hint: MIGs replace failed zone instances in other zones automatically [OK]
Common Mistakes:
  • Thinking instances are replaced in the failed zone
  • Assuming manual restart is needed
  • Believing all instances shut down
4. You configured a Managed Instance Group with health checks, but unhealthy instances are not being replaced. What is the most likely cause?
medium
A. Autohealing is disabled in the instance group
B. Instances are in multiple zones
C. Health check is not attached to the instance group
D. Firewall rules block all traffic

Solution

  1. Step 1: Check health check attachment

    Health checks must be attached to trigger autohealing, but this alone is not enough.
  2. Step 2: Verify autohealing setting

    Autohealing must be enabled in the instance group to replace unhealthy instances.
  3. Final Answer:

    Autohealing is disabled in the instance group -> Option A
  4. Quick Check:

    Autohealing disabled = no instance replacement [OK]
Hint: Autohealing must be enabled to replace unhealthy instances [OK]
Common Mistakes:
  • Assuming health check attachment alone triggers replacement
  • Blaming multi-zone setup
  • Ignoring autohealing configuration
5. You want to design a highly available web application on GCP that remains online even if an entire zone fails. Which combination of configurations best achieves this?
hard
A. Single-zone Managed Instance Group with health checks and autoscaling
B. Multi-zone Managed Instance Group with health checks and autoscaling
C. Single VM instance with a static IP and firewall rules
D. Cloud Storage bucket with versioning enabled

Solution

  1. Step 1: Understand zone failure impact

    A single zone failure can take down all instances in that zone if only single-zone is used.
  2. Step 2: Choose multi-zone MIG with health checks and autoscaling

    This setup spreads instances across zones, replaces unhealthy ones, and adjusts capacity automatically.
  3. Step 3: Evaluate other options

    Single-zone lacks zone failure protection; single VM is a single point of failure; storage bucket is not compute.
  4. Final Answer:

    Multi-zone Managed Instance Group with health checks and autoscaling -> Option B
  5. Quick Check:

    Multi-zone MIG + health checks + autoscaling = high availability [OK]
Hint: Use multi-zone MIG with health checks and autoscaling for best availability [OK]
Common Mistakes:
  • Choosing single-zone MIG ignoring zone failure
  • Using single VM which is a single failure point
  • Confusing storage bucket with compute resources
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard