4 Scaling databases

This chapter covers

  • Understanding various types of storage services
  • Replicating databases
  • Aggregating events to reduce database writes
  • Differentiating normalization vs. denormalization
  • Caching frequent queries in memory

In this chapter, we discuss concepts in scaling databases, their tradeoffs, and common databases that utilize these concepts in their implementations. We consider these concepts when choosing databases for various services in our system.

4.1 Brief prelude on storage services

Storage services are stateful services. Compared to stateless services, stateful services have mechanisms to ensure consistency and require redundancy to avoid data loss. A stateful service may choose mechanisms like Paxos for strong ...

Get Acing the System Design Interview now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.