0
0
GCPcloud~20 mins

Health checks configuration in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Health Check Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding HTTP Health Check Behavior

You configure an HTTP health check for a Google Cloud Load Balancer with the following settings:

  • Request path: /status
  • Port: 8080
  • Check interval: 10 seconds
  • Timeout: 5 seconds
  • Unhealthy threshold: 3
  • Healthy threshold: 2

If your backend service responds with HTTP 200 to /status for 1 check, then returns HTTP 500 for the next 3 checks, what will be the health status of the backend after these 4 checks?

AThe backend becomes unhealthy after 3 consecutive unhealthy responses.
BThe backend remains healthy because only 1 unhealthy response occurred.
CThe backend becomes unhealthy immediately after the first unhealthy response.
DThe backend status is unknown because the healthy threshold is 2.
Attempts:
2 left
💡 Hint

Consider how the unhealthy threshold affects status changes.

Configuration
intermediate
2:00remaining
Configuring a TCP Health Check in GCP

You want to create a TCP health check for a backend service that listens on port 3306. Which of the following YAML snippets correctly defines this health check in a Deployment Manager template?

A
type: compute.v1.healthCheck
properties:
  name: tcp-health-check
  tcpHealthCheck:
    port: "3306"
  checkIntervalSec: 10
  timeoutSec: 5
  unhealthyThreshold: 3
  healthyThreshold: 2
B
type: compute.v1.healthCheck
properties:
  name: tcp-health-check
  httpHealthCheck:
    port: 3306
  checkIntervalSec: 10
  timeoutSec: 5
  unhealthyThreshold: 3
  healthyThreshold: 2
C
type: compute.v1.healthCheck
properties:
  name: tcp-health-check
  tcpHealthCheck:
    port: 3306
  checkIntervalSec: 10
  timeoutSec: 5
  unhealthyThreshold: 3
  healthyThreshold: 2
D
type: compute.v1.healthCheck
properties:
  name: tcp-health-check
  tcpHealthCheck:
    port: 3306
  checkIntervalSec: "10"
  timeoutSec: 5
  unhealthyThreshold: 3
  healthyThreshold: 2
Attempts:
2 left
💡 Hint

Check the correct health check type and data types for port and intervals.

Architecture
advanced
2:00remaining
Designing Health Checks for Multi-Region Backends

You have a multi-region backend service deployed in two Google Cloud regions. You want to ensure that the load balancer only sends traffic to healthy backends in each region. Which health check design best supports this goal?

ACreate separate health checks for each region's backend with region-specific settings.
BDisable health checks and rely on backend logs to detect failures.
CUse a single global health check shared by all backends in both regions.
DUse a single health check but configure it to check multiple ports on all backends.
Attempts:
2 left
💡 Hint

Think about how health checks can reflect regional backend health independently.

security
advanced
2:00remaining
Securing Health Check Endpoints

Your backend service exposes an HTTP health check endpoint at /health. To improve security, you want to restrict access so only Google Cloud health check probes can reach it. Which approach is best?

ADisable health checks and rely on backend logs for health monitoring.
BConfigure firewall rules to allow traffic to <code>/health</code> only from Google Cloud health check IP ranges.
CRequire a username and password on the <code>/health</code> endpoint for all requests.
DMake the <code>/health</code> endpoint publicly accessible without restrictions.
Attempts:
2 left
💡 Hint

Consider how to limit network access to trusted sources.

Best Practice
expert
2:00remaining
Optimizing Health Check Configuration for Cost and Performance

You manage a backend service with many instances behind a Google Cloud Load Balancer. You want to optimize health check settings to reduce cost and avoid false positives without sacrificing reliability. Which combination of settings is best?

ASet check interval to 1 second, timeout to 1 second, unhealthy threshold to 1, healthy threshold to 1.
BSet check interval to 5 seconds, timeout to 1 second, unhealthy threshold to 1, healthy threshold to 1.
CSet check interval to 10 seconds, timeout to 10 seconds, unhealthy threshold to 3, healthy threshold to 3.
DSet check interval to 30 seconds, timeout to 5 seconds, unhealthy threshold to 5, healthy threshold to 2.
Attempts:
2 left
💡 Hint

Balance frequency and thresholds to reduce load and avoid flapping.