CS FundamentalsHardProduct-company system-design interview
A cache answers 90% of reads in 2 ms; on a miss the read takes 50 ms in total (cache check plus database). What is the average read latency, and what would it be at a 99% hit ratio?
- A. 6.8 ms and 2.48 ms
- B. 26 ms and 2.48 ms
- C. 6.8 ms and 2.0 ms
- D. 5.0 ms and 0.5 ms
Correct answer: A. 6.8 ms and 2.48 ms
0.9 x 2 + 0.1 x 50 = 6.8 ms; at 99%: 0.99 x 2 + 0.01 x 50 = 2.48 ms. A few points of hit ratio matter a lot because misses are 25 times slower.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Each web server handles 250 requests/s, but for headroom servers should run at no more than 70% of that. Peak load is 2,000 requests/s and…
- A service stores 2 TB of data with a replication factor of 3, and disks should be kept at most 70% full. How much raw disk capacity is…
- A host has 32 physical cores and the cloud team allows a 4:1 vCPU-to-core overcommit ratio. How many 4-vCPU VMs can be placed on it by…
- A retailer runs its systems in its own data centre but automatically moves extra web workload to a public cloud during festive-sale peaks…
- Match each storage type. P: an EC2-style VM's boot disk. Q: millions of user-uploaded images accessed by URL. R: a shared directory…
- In the Richardson maturity model for REST APIs, which feature marks the top level (Level 3)?