Access patterns decide the data store

video locked
Enroll to watch

4 mins

Chapters
About
Discussion0
Notes
Be the first to start a conversation!

A data store is designed from its access patterns: how its data is read and how it is written.

A spacecraft has to store data on very limited power. MySQL takes a 30 volt battery and the requirement is 18 volts, so a new database is built. The goal is to do less work, or to do the work in a way that is natural to the system.

Memcache and TAO are read heavy: 99.9% of their queries are reads and 0.1% are writes. Writes are so rare that only one master takes them, in the US, and many read replicas sit around the world.

A time series database has a lot of writes and very few reads, so that design does not work for it. Two more things are specific to time series:

  1. Aggregations. The number of customers who purchased a product hourly, monthly and yearly is a very common query, so the aggregations are computed before the query arrives.
  2. Timestamps. They are stored in a compressed format, which saves storage.