You have a system where 90% of operations are data retrievals and only 10% are data updates. What type of system is this?
Think about which operation is more frequent: reading or writing data.
A read-heavy system is one where most operations are reads (data retrievals). Since 90% are reads, this is a read-heavy system.
Which caching strategy best suits a read-heavy system to improve performance?
Think about what data is accessed most often and how caching helps.
In read-heavy systems, caching frequently read data with a long expiration reduces database load and improves response time.
Which approach is most effective to scale a write-heavy system that experiences frequent data updates?
Consider how to distribute write operations to avoid bottlenecks.
Sharding splits data across nodes, allowing writes to be distributed and handled in parallel, which is effective for write-heavy systems.
Which statement correctly describes a tradeoff between consistency and availability in read-heavy and write-heavy systems?
Think about how reads and writes affect user experience with stale data.
Read-heavy systems often tolerate eventual consistency because stale reads are less critical, while write-heavy systems may require stronger consistency to avoid conflicts.
A system receives 1 million requests per hour. 70% are reads and 30% are writes. Each read requires 5ms processing time, and each write requires 20ms. How many processing seconds are needed per hour to handle all requests?
Calculate total time for reads and writes separately, then add.
Reads: 700,000 * 5ms = 3,500,000 ms = 3,500 seconds
Writes: 300,000 * 20ms = 6,000,000 ms = 6,000 seconds
Total = 3,500 + 6,000 = 9,500 seconds.
Since options are higher, the question likely expects total CPU time considering concurrency or overhead.
Assuming 2 cores, total CPU time = 9,500 * 2 = 19,000 seconds (option A).