Bird
0
0

In a high-traffic system, how can you optimize availability checking to reduce latency and avoid bottlenecks?

hard📝 Trade-off Q9 of 15
LLD - Design — Hotel Booking System
In a high-traffic system, how can you optimize availability checking to reduce latency and avoid bottlenecks?
AQuery the database on every request without caching
BUse caching with short TTL for availability data
CDisable availability checking to speed up requests
DUse synchronous blocking calls for all availability checks
Step-by-Step Solution
Solution:
  1. Step 1: Understand latency and bottleneck causes

    Repeated database queries cause delays and overload.
  2. Step 2: Evaluate caching benefits

    Caching with short TTL balances freshness and speed, reducing load.
  3. Final Answer:

    Use caching with short TTL for availability data -> Option B
  4. Quick Check:

    Caching reduces latency and bottlenecks [OK]
Quick Trick: Cache availability data briefly to speed checks [OK]
Common Mistakes:
  • Querying DB every time
  • Disabling availability checks
  • Using blocking synchronous calls

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes