Netflix's TimeSeries platform addresses the challenge of managing petabytes of temporal event data by implementing a tiered storage strategy. This involves moving older, less frequently accessed data from expensive hot Cassandra storage to cheaper S3 object storage while maintaining a consistent API and acceptable latency. The article details two primary solutions: an initial Kafka/Flink-based streaming approach and an evolved, more cost-effective native Cassandra cold tier leveraging S3 backups.
Read original on Netflix Tech BlogManaging petabytes of time-series data, particularly when most queries target recent data but historical data must remain accessible, presents significant cost and operational challenges. Netflix tackled this by introducing a tiered storage solution for their TimeSeries platform, aiming to optimize storage costs while preserving performance and API consistency.
The core of Netflix's TimeSeries platform is the abstraction that partitions datasets into "Time Slices," each covering a specific time window. A crucial optimization is the concept of immutable windows: once a time slice crosses a write boundary, it becomes immutable, enabling safe application of further optimizations like data tiering. Metadata for these time slices is maintained by a dedicated control plane, which also routes read/write traffic.
The initial tiered storage solution used a familiar streaming pattern. Data was simultaneously written to Cassandra (hot storage) and streamed via Apache Kafka and Flink to S3 (cold storage). To optimize S3 writes, Flink workers hash-partition time series IDs into buckets, batching events into Parquet files grouped by event time.
Limitations of Streaming Solution
While effective, the Kafka/Flink streaming infrastructure introduced additional operational overhead, compute costs, and data transfer expenses to S3. This led Netflix to seek a more native, cost-efficient approach.
The second, more radical solution leveraged existing Cassandra backups in S3. The goal was to read directly from these S3 backups once a Time Slice was marked for cold storage, eliminating the separate streaming pipeline. This required minimal changes to the TimeSeries read path.