Bird
0
0

Given an API Gateway using the Proxy pattern, what will happen if the backend service is down when a client sends a request?

medium📝 Predict Output Q4 of 15
Rest API - Advanced Patterns
Given an API Gateway using the Proxy pattern, what will happen if the backend service is down when a client sends a request?
AThe API Gateway automatically switches to a backup service without client notice.
BThe API Gateway queues the request and retries indefinitely.
CThe API Gateway returns an error response to the client immediately.
DThe API Gateway caches the last response and returns it.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Proxy pattern behavior

    Proxy pattern forwards requests directly to backend without aggregation or fallback logic.
  2. Step 2: Consider backend failure impact

    If backend is down, proxy cannot fulfill request and returns error immediately.
  3. Final Answer:

    The API Gateway returns an error response to the client immediately. -> Option C
  4. Quick Check:

    Proxy pattern + backend down = immediate error [OK]
Quick Trick: Proxy forwards requests; no fallback by default [OK]
Common Mistakes:
MISTAKES
  • Assuming automatic retries or caching
  • Thinking proxy switches services automatically
  • Confusing proxy with aggregator fallback

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes