Interview Databases & Caching

How do you scale reads versus writes on a relational database?

Databases & Caching · Basic level

Answer

Reads can be scaled with replicas, caching, materialized views, query optimization, denormalized read models, and analytics offload. Writes are harder because consistency and uniqueness usually concentrate around one writer, so write scaling may require partitioning, sharding, queues, batching, or architecture changes.

Technical explanation

Read scaling is safe only when stale reads are acceptable or read-after-write paths use the primary.

Write scaling is constrained by transactions, constraints, referential integrity, and cross-shard behavior.

Most teams should tune queries and cache reads before redesigning writes.

Hands-on example

Example split:

POST /orders -> primary RDS writer

GET /products -> Redis/Valkey cache

GET /reports -> read replica or warehouse

Heavy post-processing -> queue and worker

This keeps OLTP writes short and moves expensive reads away from the writer.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Databases & Caching interview questions

← All Databases & Caching questions