Monitoring at Spotify: Introducing Heroic

John-John Tedro
3 min readintermediate
--
View Original

Overview

The article introduces Heroic, Spotify's in-house scalable time series database designed to handle near real-time data collection and presentation at scale. It highlights the use of Cassandra for storage and Elasticsearch for indexing, along with features like global federation and the integration of ffwd for metrics collection.

What You'll Learn

1

How to utilize Heroic for scalable time series data management

2

Why Cassandra and Elasticsearch are effective for data storage and indexing

3

How to implement global federation in a distributed database system

Prerequisites & Requirements

  • Understanding of time series databases and distributed systems
  • Familiarity with Cassandra and Elasticsearch(optional)

Key Questions Answered

What is Heroic and how does it function as a time series database?
Heroic is Spotify's in-house time series database built to manage near real-time data collection and presentation. It utilizes Cassandra for storage and Elasticsearch for indexing, allowing for efficient handling of over 50 million distinct time series across more than 200 nodes globally.
How does Heroic ensure data availability and safety?
Heroic employs a global federation feature that allows multiple clusters to operate independently, ensuring that the failure of one zone only affects data in that zone. Additionally, it can rapidly rebuild indexes from the data pipeline or Cassandra to guard against total failures.
What role does ffwd play in Spotify's monitoring infrastructure?
ffwd is an agent running on every host in Spotify's infrastructure, responsible for receiving and forwarding metrics. It allows engineers to easily instrument applications with minimal configuration, ensuring low-latency data collection.

Key Statistics & Figures

Cassandra nodes in operation
200
These nodes are distributed across several clusters worldwide, supporting over 50 million distinct time series.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Implementing Heroic can significantly enhance your monitoring capabilities for time series data.
By leveraging Heroic's scalable architecture, you can manage large volumes of metrics efficiently, which is crucial for real-time analytics and operational monitoring.
2
Utilizing global federation can improve data availability across distributed systems.
This approach allows for independent cluster operations, which helps mitigate the impact of localized failures and enhances overall system resilience.
3
Integrating Kafka into your metrics pipeline can provide a buffer during high-load scenarios.
Kafka's buffering capabilities allow for smoother data handling, especially when backend systems like Cassandra or Elasticsearch experience issues.

Common Pitfalls

1
Relying solely on Elasticsearch for data safety can lead to vulnerabilities.
Elasticsearch has a reputation for data safety issues, so it's crucial to implement strategies for rapid index rebuilding to avoid data loss.

Related Concepts

Time Series Databases
Distributed Systems
Real-time Data Processing