Bird
0
0

Consider this simplified code snippet configuring a load balancer backend in GCP:

medium📝 Predict Output Q13 of 15
GCP - Cloud Load Balancing
Consider this simplified code snippet configuring a load balancer backend in GCP:
backend_service = create_backend_service()
add_instance_group(backend_service, 'group-1')
add_instance_group(backend_service, 'group-2')

requests = 100
handle_requests(backend_service, requests)
What is the expected behavior when 100 requests arrive?
ARequests are sent to a single instance in 'group-2' only.
BAll 100 requests go to 'group-1' only.
CRequests are dropped because no URL map is set.
DRequests are evenly distributed between 'group-1' and 'group-2'.
Step-by-Step Solution
Solution:
  1. Step 1: Understand backend groups in load balancing

    When multiple instance groups are added to a backend service, the load balancer distributes incoming requests evenly among them.
  2. Step 2: Analyze request handling

    With 100 requests and two groups, requests will be balanced roughly 50 each, not all to one group or dropped.
  3. Final Answer:

    Requests are evenly distributed between 'group-1' and 'group-2'. -> Option D
  4. Quick Check:

    Multiple backends = balanced requests [OK]
Quick Trick: Multiple backends share traffic evenly [OK]
Common Mistakes:
  • Assuming all traffic goes to one group
  • Thinking requests drop without URL map
  • Believing only one instance gets all requests

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes