BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Netflix Cuts Cassandra Read Latency from Seconds to Milliseconds with Dynamic Partition Splitting

Netflix Cuts Cassandra Read Latency from Seconds to Milliseconds with Dynamic Partition Splitting

Listen to this article -  0:00

Netflix engineers have detailed a dynamic partition-splitting mechanism for Apache Cassandra that reduced read latency for oversized time-series partitions from seconds to low double-digit milliseconds while lowering read timeouts, CPU utilization, and thread queueing across production clusters. Developed for Netflix's TimeSeries Abstraction platform, the approach automatically divides growing partitions into smaller child partitions without requiring application changes, downtime, or large-scale repartitioning efforts.

The system addresses a longstanding challenge in Cassandra-based time-series workloads where continuously growing partitions can degrade performance through increased read latency, compaction overhead, memory pressure, and uneven load distribution. Netflix reported that services managing partitions larger than 500 MB, which previously experienced availability issues, were able to continue paginating and querying data while remaining operational after the feature was deployed.

Time-series data in Cassandra is commonly organized into partitions that group events by identifier and time range. While initial partition sizing assumptions may be valid when systems are first deployed, changing traffic patterns, retention policies, and uneven data growth can cause some partitions to become significantly larger than anticipated. According to Netflix, addressing these issues traditionally requires schema redesigns, repartitioning efforts, or application modifications that can be costly and operationally disruptive at scale.

To address these challenges, Netflix built an automated partition evolution framework that detects oversized partitions and asynchronously splits them once predefined thresholds are exceeded. The system maintains metadata describing partition boundaries and split history, allowing applications to continue querying the same logical partition while the underlying storage layout evolves transparently.

Dynamic Wide Partition Split Async Pipeline (Source: Netflix Blog Post)

The architecture introduces a metadata layer that tracks parent and child partition relationships. During reads, the metadata service determines which child partitions contain the requested data and routes queries accordingly. Results retrieved from multiple partitions are merged before being returned to the client. Netflix noted that this approach enables data redistribution without requiring service downtime or modifications to application interfaces.

Operational safety was a key design consideration. Partition splitting in a distributed system introduces challenges related to concurrent writes, data movement, and consistency guarantees. To reduce complexity and deployment risk, the initial implementation focused on immutable partitions. The original partition is retained throughout the migration process, providing a fallback mechanism if issues occur while data is being redistributed.

Netflix also incorporated validation mechanisms to verify correctness during partition evolution. Existing verification pipelines were used to compare results returned from original partitions with those generated through the new read path. Engineers performed phased rollouts, gradually increasing production traffic only after confirming consistency between the two approaches.

According to Netflix, average read latency for affected partitions decreased from seconds to low double-digit milliseconds following deployment. Tail latencies were reduced from several seconds to approximately 200 milliseconds or less. The company additionally reported reductions in read timeouts, lower CPU utilization, and minimal thread queueing across Cassandra clusters.

Phased Read Rollout and Validation Process (Source: Netflix Blog Post)

Netflix stated that future work includes support for mutable wide partitions and mechanisms to reprocess previously failed partition splits. Reflecting on the deployment, the engineering team noted that reducing the surface area of a complex architectural change and validating it incrementally proved valuable when introducing the capability into production systems.

About the Author

Rate this Article

Adoption
Style

BT