Practice
Solution
Step 1: Identify compliance needs for strong consistency and auditability
Compliance requires strict transactional guarantees and immutable audit trails.Step 2: Evaluate storage options
NoSQL and object stores offer eventual consistency, risking stale reads. Kafka provides append-only logs but lacks transactional ACID guarantees for metadata queries. Relational DBs provide ACID transactions and built-in audit logging, ensuring compliance.Final Answer:
Option A -> Option AQuick Check:
Relational DBs ensure ACID and audit logging for compliance [check]
Solution
Step 1: Identify real-time aggregation needs
Millions of listings require low-latency updates; immediate consistency is not mandatory.Step 2: Evaluate architectures
Relational DB (A) is costly and slow at scale; batch jobs (C) have high latency; NoSQL denormalization (D) risks write amplification and stale data. Stream processing (B) provides scalable, low-latency aggregation with eventual consistency.Final Answer:
Option A -> Option AQuick Check:
Stream processing enables scalable real-time aggregation with eventual consistency [check]
Solution
Step 1: Trace Kafka's role in upload pipeline
Kafka buffers upload events for async processing; frontend uploads don't block on Kafka (A wrong).Step 2: Identify failure impact
Metadata extraction and transcoding (B) stall but do not cause immediate video unavailability; feed algorithm (D) depends on processed data, not Kafka directly.Step 3: Recognize CDN caching dependency
Without Kafka, processed videos don't reach CDN timely, causing cache misses and playback failures (C).Final Answer:
Option D -> Option DQuick Check:
Kafka outage delays CDN caching, causing playback failures [check]
Solution
Step 1: Understand reverse proxy SSL termination failure
If the reverse proxy crashes, SSL termination stops, so backend servers receive unencrypted traffic if clients connect directly or fallback occurs.Step 2: Eliminate other options
Clients cannot connect directly if proxy is mandatory; SSL handshake fails only if proxy blocks connection; proxy can't forward encrypted requests without decrypting if crashed.Final Answer:
Option C -> Option CQuick Check:
Reverse proxy crash exposes backend to unencrypted traffic [check]
Solution
Step 1: Analyze client connectivity constraints
Mobile clients often have intermittent connectivity and poor support for HTTP/2 streaming.Step 2: Evaluate streaming options
Direct gRPC streaming (A) is unreliable on mobile. WebSockets (C) add complexity and JSON is less efficient. REST long polling (D) is less efficient and higher latency. Unary calls with polling and backoff (B) handle intermittent connectivity gracefully.Final Answer:
Option B -> Option BQuick Check:
Mobile intermittent -> unary calls + polling with backoff [check]
