Monarch

video locked
Enroll to watch

15 mins

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

Monarch is Google's in-memory time series data store for server side metrics.

It takes in 6 million data points per second, holds petabytes of data and answers in less than a hundred milliseconds. It has no hard dependency: if Spanner or Colossus goes down, Monarch keeps running.

It replaces Borgmon, which each team deployed on its own servers:

  1. Petabytes read at any time are kept in memory, which is very expensive.
  2. A histogram is stored for every time window, with an example request for each of its windows. Shared timestamps save 90% of timestamp storage, and differential encoding compresses every time series by around 90%.
  3. Leaves hold the data, under 30 or 40 zones and one root. A query goes root, zone, leaf, and results are aggregated on the way back.
  4. A field hints index of hashed trigrams skips leaves that cannot hold a key. Queries execute 1000 times faster.
  5. Data is stored in three leaves. A soft timeout and hedged requests keep a query from waiting on a slow zone or leaf.