AlgoViz

Design a Metrics Monitoring System (Datadog)

hard 50 min

Collect five million numbers a second from 100,000 hosts, keep them for a year, draw dashboards quickly and wake somebody when it matters.

Where it shows up

The same pattern appears across everyday software.

  • A deployment goes wrong

    The error rate of one version climbs. A rule grouped by version fires after two minutes and the team rolls back.

  • A disk that will fill on Sunday

    A forecast rule draws a line through the last days and warns on Friday, in working hours.

  • Facebook's recent-data store

    The Gorilla paper reports that at least 85% of queries asked for the past 26 hours, so that much was kept in memory.

  • Prometheus on one machine

    Its documentation gives 1 to 2 bytes a sample on average and says local storage is limited to one node.

  • CloudWatch retention steps

    AWS documents points under 60 seconds for 3 hours, 1 minute for 15 days, 5 minutes for 63 days and 1 hour for 455 days.

  • Thanos compaction

    Its documentation describes 5-minute downsampling for blocks older than 40 hours and 1-hour for blocks older than 10 days.