Company
Date Published
Author
Artem Krylysov, May Lee
Word count
4004
Language
English
Hacker News points
4

Summary

Datadog's original indexing strategy relied heavily on automatically generating indexes based on the query log of a live system. The new indexing strategy, inspired by search engines' inverted index, associates every tag in a timeseries with the identifiers of timeseries that contain the tag. This approach simplifies the ingestion path and makes it less CPU-intensive, as well as removing the need for running several CPU-consuming background jobs responsible for maintaining the indexes. Additionally, the service is now sharded internally to parallelize query execution and take advantage of larger nodes with more CPU cores, resulting in a nearly 8x performance boost without adding too much overhead from splitting and having to merge the timeseries back. The service was also rewritten from Go to Rust, making CPU-demanding operations up to 6x faster. This resulted in a 99% reduction of query timeouts and made the timeseries index nearly 50% cheaper to run.