Rest API - Advanced PatternsGiven 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.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand Proxy pattern behaviorProxy pattern forwards requests directly to backend without aggregation or fallback logic.Step 2: Consider backend failure impactIf backend is down, proxy cannot fulfill request and returns error immediately.Final Answer:The API Gateway returns an error response to the client immediately. -> Option CQuick Check:Proxy pattern + backend down = immediate error [OK]Quick Trick: Proxy forwards requests; no fallback by default [OK]Common Mistakes:MISTAKESAssuming automatic retries or cachingThinking proxy switches services automaticallyConfusing proxy with aggregator fallback
Master "Advanced Patterns" in Rest API9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Rest API Quizzes API Documentation - OpenAPI Specification (Swagger) - Quiz 13medium API Documentation - Why documentation drives adoption - Quiz 10hard API Testing and Monitoring - API monitoring and alerting - Quiz 4medium API Testing and Monitoring - Integration testing - Quiz 14medium API Testing and Monitoring - Contract testing - Quiz 1easy API Testing and Monitoring - Contract testing - Quiz 2easy Advanced Patterns - Why advanced patterns solve real problems - Quiz 7medium Caching Strategies - If-None-Match and 304 responses - Quiz 2easy Webhooks and Events - Retry and failure handling - Quiz 11easy Webhooks and Events - Why webhooks push notifications - Quiz 5medium