Practice
Solution
Step 1: Understand BFF responsibilities at step 4
At step 4, the BFF aggregates data from multiple microservices and transforms it into a response tailored to the client's needs.Step 2: Eliminate incorrect options
BFF caches the entire response from microservices before returning to client is wrong because caching happens after response, not before calling microservices. BFF directly proxies the request without modification to microservices is incorrect as BFF modifies requests/responses rather than proxying blindly. BFF performs authentication and then sends request to a single microservice is incomplete; authentication usually happens earlier at API Gateway, and BFF calls multiple microservices, not just one.Final Answer:
Option A -> Option AQuick Check:
BFF aggregates and transforms data before responding [check]
Solution
Step 1: Identify seat locking requirements
Seat locking must be temporary with automatic expiration to avoid indefinite holds if payment fails.Step 2: Evaluate options for temporary locks
Relational DB locks block resources and can cause deadlocks; message queues serialize but add latency and don't expire locks; client-side locking is unreliable and insecure. Distributed cache with TTL provides automatic expiration and fast access.Final Answer:
Option C -> Option CQuick Check:
Redis TTL auto-expires locks, preventing stale seat holds [check]
Solution
Step 1: Trace Delivery Worker decision at Step 4 -- Bob's device offline
The Delivery Worker reads the message from Kafka but cannot deliver it immediately because Bob is offline.Step 2: Understand retry and message retention behavior
The worker retries delivery asynchronously and keeps the message in Kafka until Bob acknowledges receipt. It does not block other deliveries or delete messages prematurely.Final Answer:
Option A -> Option AQuick Check:
Delivery Worker retries and retains message until ack [check]
Solution
Step 1: Identify stateful bottleneck
Chat servers maintain WebSocket connections statefully, limiting horizontal scaling.Step 2: Understand scaling impact
At 10x scale, existing WebSocket connections cannot be moved, causing chat servers to saturate first.Final Answer:
Option C -> Option CQuick Check:
Stateful WebSocket servers bottleneck scaling before DB or load balancer [check]
Solution
Step 1: Identify scaling bottlenecks
Blue-Green requires two full environments; load balancer scales horizontally; feature flags scale independently.Step 2: Analyze deployment pipeline
Build servers face 10x concurrent builds, causing queueing and delays, blocking releases.Step 3: Compare other components
Load balancer and feature flags can be sharded; doubling environment cost is expensive but not a failure.Final Answer:
Option A -> Option AQuick Check:
Build servers bottleneck at 10x concurrent builds, delaying deployments [check]
