Practice
1. In a system trace, at Step 3 the Storage Estimator component calculates daily storage needs. If the average object size is 2MB and the system expects 500K new objects daily, what is the storage estimate at Step 3?
easy
Solution
Step 1: Calculate daily storage
Multiply 500,000 objects by 2MB each = 1,000,000 MB = 1TB per day.Step 2: Eliminate other options
500GB per day, assuming 1MB average object size instead uses wrong object size; 2TB per day, assuming 4MB average object size instead doubles size incorrectly; Cannot estimate without knowing retention period ignores that retention affects total storage, not daily estimate.Final Answer:
Option B -> Option BQuick Check:
500K x 2MB = 1TB daily storage [check]
Hint: Daily storage = object count x average size [check]
Common Mistakes:
2. If the Bloom filter's hash functions are not independent and produce correlated outputs, what is the exact failure mode observed?
medium
Solution
Step 1: Understand hash function independence role
Independent hash functions distribute bits uniformly; correlated hashes cause clustering.Step 2: Trace effect of correlated hashes
Correlated hashes set overlapping bits, saturating the bit array faster, increasing false positives and reducing filter effectiveness.Final Answer:
Option A -> Option AQuick Check:
Correlated hashes cause bit array saturation, raising false positives [check]
Hint: Correlated hashes cause bit array saturation and false positives [check]
Common Mistakes:
3. For the For-You feed algorithm, which architecture best balances freshness of recommendations with scalability when serving millions of users?
medium
Solution
Step 1: Evaluate synchronous recomputation
Monolithic synchronous (A) causes high latency and poor scalability.Step 2: Compare batch vs streaming
Streaming (C) offers freshness but is complex and costly at scale; client-side (D) lacks data for quality recommendations.Step 3: Select batch precompute
Batch jobs (B) balance freshness and scalability by precomputing and caching recommendations.Final Answer:
Option C -> Option CQuick Check:
Batch precompute caches recommendations for scalable freshness [check]
Hint: Batch precompute balances freshness and scale best [OK]
Common Mistakes:
4. If the shared database in a microservices architecture is unavailable, what is the immediate failure impact on services that rely on it?
medium
Solution
Step 1: Understand failure impact of shared database outage
Services depending on the shared DB cannot proceed with reads/writes, causing blocking or errors.Step 2: Evaluate fallback mechanisms
Some microservices implement internal queuing and retry logic to handle transient DB failures asynchronously, preventing immediate request failures.Final Answer:
Option A -> Option AQuick Check:
Internal queuing and retries mitigate DB outage impact [check]
Hint: Queue and retry internally to survive DB outages [check]
Common Mistakes:
5. At 10x scale, which component in the multi-tenant SaaS platform is most likely to fail first, and why?
hard
Solution
Step 1: Analyze scaling bottlenecks
Billing DB (A) can be scaled with sharding; Tenant Metadata (C) can be cached; API Gateway (D) handles stateless HTTP mostly.Step 2: Evaluate Feature Flag Service cache at scale
Cache invalidation and stale data grow exponentially, causing inconsistent feature exposure and client errors.Final Answer:
Option A -> Option AQuick Check:
Feature flag cache stale -> inconsistent behavior at scale [check]
Hint: Feature flag cache stale -> first scale failure [check]
Common Mistakes:
