Complete the code to identify a read-heavy system characteristic.
if system_type == '[1]': optimize_for = 'cache and fast reads'
Read-heavy systems focus on optimizing read operations, often using caching.
Complete the code to identify a write-heavy system characteristic.
if system_type == '[1]': optimize_for = 'fast writes and data durability'
Write-heavy systems focus on fast and reliable write operations.
Fix the error in the system optimization check.
if workload == '[1]': use_cache = True else: use_cache = False
Caching is mainly beneficial for read-heavy workloads.
Fill both blanks to optimize system design for read-heavy and write-heavy workloads.
if workload == '[1]': database = 'replicated read replicas' elif workload == '[2]': database = 'sharded write nodes'
Read-heavy systems use read replicas; write-heavy systems use sharding for writes.
Fill all three blanks to complete the system design for read-heavy and write-heavy workloads with caching strategy.
system = {
'type': '[1]',
'database': '[2]',
'cache_enabled': [3]
}Read-heavy systems use replicated read replicas and enable caching.
