Bird
0
0

You want requests to https://app.example.com/api/v2/orders to go to backend-orders and all other /api/v2/* requests to backend-api. How should you configure the path rules in the URL map?

hard📝 Application Q8 of 15
GCP - Cloud Load Balancing
You want requests to https://app.example.com/api/v2/orders to go to backend-orders and all other /api/v2/* requests to backend-api. How should you configure the path rules in the URL map?
AAdd a path rule for <code>/api/v2/orders</code> to backend-orders, and a catch-all <code>/api/v2/*</code> to backend-api.
BSet defaultService to backend-orders and add a path rule for <code>/api/v2/orders</code> to backend-api.
CAdd a host rule for app.example.com pointing directly to backend-orders.
DUse a path matcher with only a defaultService set to backend-api.
Step-by-Step Solution
Solution:
  1. Step 1: Identify specific path routing

    Requests to /api/v2/orders must go to backend-orders.
  2. Step 2: Handle other /api/v2/* requests

    All other /api/v2/* requests go to backend-api.
  3. Step 3: Configure path rules

    Define a path rule for /api/v2/orders to backend-orders, then a broader path rule /api/v2/* to backend-api.
  4. Final Answer:

    Add a path rule for /api/v2/orders to backend-orders, and a catch-all /api/v2/* to backend-api. -> Option A
  5. Quick Check:

    Specific path rules override broader ones [OK]
Quick Trick: Specific path rules take precedence over catch-alls [OK]
Common Mistakes:
  • Setting defaultService incorrectly
  • Not ordering path rules properly
  • Using host rules instead of path rules for path routing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes