0
0
GCPcloud~20 mins

URL maps for routing in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
URL Maps Routing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does a URL map route traffic based on host rules?

Consider a URL map configured with two host rules: one for example.com routing to backend service A, and another for test.com routing to backend service B. What happens when a request is sent to example.com?

AThe request is rejected because only test.com is configured in the URL map.
BThe request is routed to backend service B because test.com is the default host.
CThe request is routed to a random backend service because host rules do not affect routing.
DThe request is routed to backend service A because the host matches example.com.
Attempts:
2 left
💡 Hint

Think about how host rules match the domain name in the request.

Configuration
intermediate
2:00remaining
What is the effect of path matchers in a URL map?

A URL map has a path matcher that routes requests with path /images/* to backend service Images, and all other paths to backend service Default. What backend service handles a request to /images/logo.png?

ABackend service Default, because /images/logo.png is not an exact match.
BBackend service Images, but only if the host matches a specific host rule.
CBackend service Images, because the path matches /images/*.
DThe request is rejected because no exact path match exists.
Attempts:
2 left
💡 Hint

Consider how path matchers use wildcard patterns.

Architecture
advanced
3:00remaining
How to design a URL map for multi-region backend routing?

You want to route users to backend services in different regions based on URL path prefixes: /us/* to US backend, /eu/* to EU backend, and all others to a global backend. Which URL map configuration achieves this?

ACreate separate URL maps for each region and use DNS to route users.
BCreate path matchers for /us/* routing to US backend, /eu/* routing to EU backend, and a default path matcher routing to global backend.
CUse host rules to route /us/* and /eu/* paths to respective backends.
DConfigure backend services to detect user location and redirect requests.
Attempts:
2 left
💡 Hint

Think about how path matchers can route based on URL paths.

security
advanced
2:00remaining
What happens if a URL map has no default backend service configured?

A URL map is created with host and path rules but no default backend service. What is the expected behavior when a request does not match any host or path rule?

AThe request is rejected with a 404 Not Found error.
BThe request is routed to the first backend service defined in the URL map.
CThe request is routed to a global default backend service automatically.
DThe request is redirected to the root path of the first host rule.
Attempts:
2 left
💡 Hint

Consider what happens when no matching rule exists and no default is set.

Best Practice
expert
3:00remaining
How to optimize URL map configuration for minimal latency in global load balancing?

You manage a global HTTP(S) load balancer with multiple backend services worldwide. Which URL map design best reduces latency for users worldwide?

AUse host and path rules to route requests to backend services closest to the user's region, combined with Cloud CDN for caching.
BRoute all requests to a single global backend service to simplify configuration.
CUse only host rules without path matchers to reduce URL map complexity.
DConfigure URL maps to route based on IP address ranges instead of URL paths.
Attempts:
2 left
💡 Hint

Think about combining routing and caching to improve latency.