Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A microservices application on Google Cloud frequently calls an external product catalog REST API to retrieve metadata that changes only once every few hours. During peak traffic, the application experiences latency spikes, occasional HTTP 429 and 503 responses, and intermittent HTTP 400 responses caused by malformed client parameters.
You need to redesign the API integration to:
Which combination of strategies should you implement?
This configuration combines built-in client library retry mechanisms with an unbounded custom retry loop in application code using a fixed 1-second interval, while sending every read request directly to the external API without caching.
400 Bad Request. A fixed 1-second delay without backoff or jitter also allows clients to synchronize and overwhelm the backend.The requirement demanded zero stale data under all circumstances and the application relied solely on a properly tuned client library retry policy (without an outer infinite loop) for transient errors only. Even then, caching with an appropriate TTL is strongly preferred for data that updates only every few hours.
ResponseCache policy with default settings to cache all HTTP status codes for 10 minutes, and configure the client to immediately retry all 4xx and 5xx responses up to five times.An Apigee ResponseCache policy intercepts API responses at the proxy layer and stores them in cache memory so repeated requests do not reach the backend server. In its default configuration, ResponseCache caches responses regardless of their HTTP status code. Pairing this with immediate retries across all 4xx and 5xx status codes causes clients to resend failed requests with zero delay for both client-side and server-side errors.
ResponseCache behavior caches all HTTP status codes, temporary 5xx or 429 backend errors remain stored for the full 10-minute TTL and continue to be returned to users even after the backend recovers.4xx codes includes permanent failures like 400 Bad Request, 401 Unauthorized, and 403 Forbidden, which cannot succeed without fixing the underlying request.5xx errors creates hard-to-debug outages where clients see errors despite healthy backend metrics.<ExcludeErrorResponse>true</ExcludeErrorResponse> in the policy configuration.The ResponseCache policy explicitly excluded error responses (<ExcludeErrorResponse>true</ExcludeErrorResponse>), and the client retried only transient errors (408, 429, 5xx) using truncated exponential backoff with jitter rather than immediate retries across all 4xx codes.
5xx errors—in Memorystore for Redis for graceful degradation, and implement a custom retry loop that retries every 400, 429, and 503 response using exponential backoff without a maximum retry limit.This approach uses Memorystore for Redis to cache every response returned by the external API, including 5xx server errors, and applies a custom exponential backoff loop without jitter or truncation across 400, 429, and 503 status codes.
5xx error payloads. Storing 5xx errors causes users to receive cached failures long after the API stabilizes.400 Bad Request in the retry loop violates error classification best practices, because malformed client parameters will fail on every attempt.2xx data rather than persisting upstream error responses.4xx codes (except 408 and 429) indicate client-side issues that require fixing the request payload, not retrying.Memorystore cached only valid 2xx responses (serving stale valid data during outages), 400 errors were excluded from retries, and the exponential backoff algorithm included both random jitter and a maximum attempt or deadline cap.
2xx responses in Memorystore for Redis while excluding error responses, and implement truncated exponential backoff with jitter only for idempotent requests returning 408, 429, or 5xx status codes.This approach combines an in-memory caching layer using Memorystore for Redis with a disciplined truncated exponential backoff with jitter retry strategy. Caching stores frequently accessed, slowly changing responses in memory so subsequent reads avoid hitting the external API. Truncated exponential backoff progressively increases wait times between retry attempts up to a defined maximum delay and attempt limit, while jitter adds a random delay to each interval.
408, 429, and 5xx) and idempotent operations ensures malformed client requests (400 Bad Request) fail fast without wasting compute or quota.2xx responses and explicitly excluding errors guarantees that temporary backend outages are never persisted in the cache after the upstream service recovers.Unlike strategies that cache error responses, retry permanent 4xx client errors, or omit jitter and retry limits, this design balances performance optimization with fault isolation. It protects both the client microservices and the downstream API from cascading failures while keeping data accurate and responsive.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated