Practice
Solution
Step 1: Identify search workload characteristics
High concurrency and complex attribute filtering require fast full-text and faceted search capabilities.Step 2: Evaluate component suitability
Relational DBs (A) struggle with complex full-text and scale; Redis (C) is a cache, not a search engine; message queues (D) buffer but don't execute search queries. Elasticsearch (B) provides distributed inverted indexes optimized for such queries.Final Answer:
Option A -> Option AQuick Check:
Distributed inverted indexes -> low-latency complex search [check]
Solution
Step 1: Trace synchronous call behavior at step 3
Order Service calls Inventory Service synchronously, so it waits for response before replying to client.Step 2: Analyze impact of slow Inventory Service
Because of synchronous call, client request blocks until Inventory Service responds or times out; no immediate return or retries happen automatically.Final Answer:
Option D -> Option DQuick Check:
Synchronous calls block caller until response or timeout [check]
Solution
Step 1: Analyze latency vs throughput needs
Batch processing adds latency but can increase throughput and tolerate some message loss.Step 2: Evaluate architectures
Synchronous (A) increases latency; asynchronous queue (B) reduces latency but may cause duplicates; distributed cache (D) lacks delivery guarantees; batch (C) balances throughput with acceptable latency for some use cases.Final Answer:
Option A -> Option AQuick Check:
Batching trades latency for throughput, tolerating some loss [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]
Solution
Step 1: Identify stateful components in WebSocket architecture
WebSocket connections are stateful and maintained in server memory, binding clients to specific chat servers.Step 2: Analyze scaling challenges
At 10x scale, chat servers face difficulty resharding connections or migrating them, limiting horizontal scaling. Databases and load balancers can be scaled more easily. Client browser limits are less impactful at system scale.Final Answer:
Option A -> Option AQuick Check:
WebSocket stateful connections -> chat servers bottleneck at scale [check]
