Netflix AI チーム、Cassandra パーティションを ID ごとに分割し読み取り遅延を秒からミリ秒に短縮
Netflix のエンジニアリングチームは、Cassandra の広域パーティションを ID 単位で動的に分割する手法により、読み取りレイテンシを秒からミリ秒レベルに劇的に改善した。
キーポイント
動的パーティショニングの仕組み
アプリケーションの変更を必要とせず、非同期かつ透明性を持って広すぎる Cassandra パーティションを ID 単位で子パーティションへ分割する手法を採用した。
読み取り経路の最適化技術
ブールフィルタ(数マイクロ秒)とキャッシュされたメタデータ照合により、リクエストを小さな子パーティションにルーティングし、レイテンシを低減した。
パフォーマンス劇的改善
読み取り時間が数秒から低二桁のミリ秒へ短縮され、テールレイテンシも約 200ms に低下し、500MB 以上の巨大パーティションでも可用性を維持した。
データ整合性の担保
チェックサム、元のパーティションの保持、Data Bridge Spark による検証、シャドウ比較など、複数のガードレールでデータの正しさを厳密に保証している。
ID ごとの動的パーティション分割
テーブル全体ではなく個別の TimeSeries ID レベルで、読み込み時に検出された広大なパーティションを非同期パイプラインで分割する仕組みです。
読み込み経路での検出とイベント通知
書き込み時ではなく読み込み時にバイト数を追跡し、設定閾値を超えた場合に Kafka を経由して分割イベントを発生させることで、不要な処理を防ぎます。
不変パーティションの優先対象
複雑さを減らすため、初期実装では書き込みが停止した(immutable な)パーティションを対象として検出と分割を優先しています。
影響分析・編集コメントを表示
影響分析
この技術は、時系列データを扱う大規模システムにおいて、予測不能なワークロード変化やデータ偏在(アウトライヤー)に対しても、柔軟かつ高パフォーマンスな読み取りを維持する新たな標準となる可能性を秘めています。特に、アプリケーション側の複雑さを増やすことなくストレージ層で問題を解決するアプローチは、多くのクラウドネイティブおよびデータ集約型サービスにとって即座に適用可能な重要な知見です。
編集コメント
大規模データ処理における「テールレイテンシ」の解消は、ユーザー体験に直結する重要な課題であり、その解決策として提示された動的パーティショニング手法は非常に示唆に富んでいます。アプリケーション層への負荷を最小限に抑えつつストレージ側で自律的に最適化するこのアプローチは、今後同様のスケールを持つシステム設計の参考となるでしょう。
Netflix のエンジニアリングチームは、Apache Cassandra におけるワイドパーティションの処理方法に関する手法を発表しました。この研究は、時系列イベントデータを扱うプラットフォームである Netflix の TimeSeries Abstraction を対象としています。
TL;DR
動的パーティショニングは、アプリケーション側の変更を必要とせず、非同期かつ透明性を持って、TimeSeries ID ごとにワイドな Cassandra パーティションを分割します。
検出プロセスは、バイトカウントと Kafka イベントを通じて読み取りパス上で実行され、分割の対象はまず不変のパーティションから行われます。
ブルームフィルタ(単一桁マイクロ秒)とキャッシュされた wide_row メタデータ参照により、読み取りがより小さな子パーティションへルーティングされます。
チェックサム、保持された元のパーティション、Data Bridge Spark による検証、およびシャドウ比較によって正しさが保証されます。
読み取り性能は数秒から低二桁のミリ秒に改善され、遅延の尾部(tail latency)は約 200 ミリ秒まで低下しました。500MB を超えるパーティションも引き続き利用可能です。
動的再パーティショニングとは何か?
Netflix の TimeSeries Abstraction は、ミリ秒単位のレイテンシでペタバイト規模の時系列イベントデータを収集・照会します。基盤ストレージとして Apache Cassandra 4.x を採用しています。Cassandra が選ばれた理由は、スループット、レイテンシ、コスト、および運用上の成熟度です。
時系列データは、識別子と時間範囲に基づいてイベントをグループ化するパーティションに整理されています。これらのパーティションは、時間の経過とともにイベントが蓄積するにつれて「ワイド(広大)」になることがあります。動的再パーティショニングでは、過大なパーティションを非同期でより小さな子パーティションに分割します。アプリケーション側は同じ論理パーティションに対して照会を継続しますが、ストレージレイアウトは透明性を持って進化していきます。
なぜワイドパーティションが読み取りを阻害するのか
ほとんどのデータセットにおいて、平均読み取りレイテンシは単一桁のミリ秒に収まります。ただし、パーティションが広がりすぎると、尾部(テール)の読み取りレイテンシが数秒にまで上昇します。これらの低速な読み取りにより、読み取りタイムアウトが発生する可能性があります。極端なケースでは、クラスターでガベージコレクションの停止、高い CPU 利用率、スレッドキューイングが見られます。
TimeSeries サーバーは非常に高い読み取りスループットも処理するため、この問題はさらに複雑化します。Cassandra クラスターのスケールアップは常に選択肢の一つです。しかし、Netflix チームは単に資金を投入するだけでなく、より賢い代替策を求めていました。
TimeSeries におけるパーティショニング戦略
TimeSeries はデータセットを離散的な時間チャンク(タイムスライス、時間バケット、イベントバケット)に分割します。これにより、Netflix チームはタイムスタンプに基づいてデータを照会したり削除したりすることができ、トロンボストーン(墓碑標識)を作成する必要がなくなります。名前空間(データセット)が作成される際、ユーザーは予想されるワークロード特性を指定します。プロビジョニングパイプラインはモンテカルロシミュレーションを実行し、インフラストラクチャとパーティション構成を選択します。
この事前アプローチには、3 つの状況において限界があります。まず、プロジェクトの初期段階ではワークロードが不明であったり、不正確に推定されたりする可能性があります。次に、トラフィックや製品要件の変化に伴い、ワークロード自体が進化する場合です。最後に、データの外れ値が存在する場合で、少数の ID に極めて多くのイベントが集中することがあります。
離散的なタイムスライスは、最初の 2 つのケースに対する自然な回避策(エスケープハッチ)を提供します。新しいタイムスライスごとに異なるパーティショニング戦略を使用できるためです。しかし、数千ものデータセットを手動で調整することは持続可能ではないため、自動化が必要です。
解決策 1: タイムスライスの再パーティショニング
Cassandra は、パーティションサイズのパーセンタイルを把握するための nodetool tablehistograms などの内部参照 API を公開しています。バックグラウンドワーカーがこれらのヒストグラムを監視し、Cassandra の仮想テーブルを通じて公開します。また、パーティションサイズが設定された密度の閾値から外れた場合に調整係数を計算します。この密度はワークロードに応じて通常 2 MiB から 10 MiB の間に設定されます。
例えば、プロビジョニング時に一度選択されたのは 60 秒ごとのタイムバケットであり、これにより 10 KB 未満のパーティションが生成されました。この過剰なパーティショニングは、読み取り増幅とスレッドキューイングを引き起こしました。ワーカーは、修正された戦略で将来の Time Slices を更新します。
Copy CodeCopiedUse a different Browser
DynamicTimeSliceConfigWorker:
namespace: my_dataset_1
Observed: TimeSlices の p99 パーティションが 10MB という設定目標を下回っていることを確認。
Proposed: time_bucket interval: 60s -> 604800s
これにより、スレッドキューイングに起因する読み取りレイテンシとタイムアウトが減少しました。ただし、これはテーブルの大部分が再パーティショニングを必要とする場合にのみ有効です。一部の ID のみが広大(wide)である場合には効果はありません。そのような部分的なケースに対しては、Netflix チームは 3 つの選択肢を提供しています。
何もしない:トップレベルのメトリクスに影響が見られない場合の適切な対応です。
部分的な返却:レイテンシ SLO を違反している進行中のリクエストを中止し、それまでに収集されたデータを返します。
ID のブロック:システムを不安定化させるテスト用 ID やスパム ID に対する究極の措置です。
Block IDs は設定を通じて適用され、問題のある TimeSeries ID をリスト形式で指定します。
Copy CodeCopiedUse a different Browser
dgwts.config..block.Ids: ", , "
これらのオプションは、有効かつ重要な ID が広範囲にわたる場合には役立ちません。それらの呼び出し元は依然としてすべてのイベントを必要とするため、ここでソリューション 2 が適用されます。
ソリューション 2: ID ごとの動的パーティショニング
ID ごとの動的パーティショニングは、TimeSeries ID ごとに広範なパーティションを分割する非同期パイプラインです。これはテーブルレベルではなく、ID レベルで動作します。このプロセスには 3 つのステージがあります:検出(Detection)、計画と分割(Planning & Splitting)、そして読み取りサービス提供(Serving Reads)です。
検出は読み取りパス上で行われます。すべての読み取り操作では、パーティションごとに読み取られたバイト数が追跡されます。読み取られたバイト数が設定されたしきい値を超えると、サーバーが Kafka にイベントを出力します:
{
"time_slice": "data_20260328",
"time_series_id": "profileId:123",
"time_bucket": 7,
"event_bucket": 2,
"immutable": true,
"version": "0"
}ここで、immutable フィールドは書き込みを受け付けなくなったパーティションを示します。version フィールドは無効化など将来の用途のために予約されています。Netflix チームが読み取りで検出を行うのは、データの大部分に分割が必要ないためです。広範なパーティションに対する一部の読み取りは、パイプラインが追いつくまで数秒間低速のままになります。初期の実装では複雑さを減らすために、不変(immutable)なパーティションを対象としています。
計画フェーズでは、正確な分割プランを計算するためにパーティション全体を一度だけ読み取ります。チェックポイント機能により、失敗した計画読み取りは最後に保存された地点から再開できます。wide_row メタデータテーブルには、分割状態、チェックポイント、およびルーティング情報が格納されます。
分割は、EventBucketPartitionSplitStrategy などの戦略に委譲されます。これにより、同じ時間バケットに対してより多くのイベントバケットが割り当てられます。超広域パーティションの場合、読み込みの増幅を制御するためにイベントバケット数を上限まで制限します。それでもパーティション間で分散させることで、Cassandra レプリカ全体に読み込みを分散させることができます。
検証では、分割前のチェックサムと分割後のチェックサムを比較します。両方のチェックサムが一致した場合のみ、分割は COMPLETED(完了)としてマークされます。Netflix ではまた、分割前後のパーティションサイズも追跡し、分割が適切なサイズで行われたことを確認しています。
読み込みパス:ブルームフィルタとメタデータルーティング
TimeSeries サーバーは、完了した分割パーティションキーを定期的にインメモリのブルームフィルタにロードします。すべての読み込み操作でブルームフィルタがチェックされ、これは単一桁のマイクロ秒で応答します。このチェックは非常に軽量であるため、呼び出し側にとっては実質的に不可視です。ヒットした場合、サーバーは wide_row メタデータを読み込んでクエリをルーティングします:
{
"pre_split_data": {
"time_slice": "data_20260328",
"time_series_id": "6313825",
"time_bucket": 0,
"event_bucket": 2
},
"post_split_data": {
"time_slice": "wide_data_20260328_0",
"event_bucket_partition_strategy": {
"target_event_buckets": 2,
"start_event_bucket": 32
}
}
}必ず JSON 形式で返してください。translation フィールドのみ。他のフィールド (technical_terms 等)は一切追加しないこと — 余計なフィールドを書こうとして本文翻訳がトークン上限で打ち切られる事故を防ぐため:
{"translation": "翻訳全文"}
そのメタデータ読み取りは、リードスルーキャッシュによって裏付けられています。既存の PartitionReader は、分割されたより小さなパーティションから読み取りを提供します。同じスキーマを再利用することでコード変更が最小限に抑えられ、結果は返却前にマージされます。元のワイドパーティションは決して削除されないため、部分的な障害や最終的な整合性に対する安全なフォールバックが提供されます。
Netflix チームはまた、Data Bridge Spark ジョブを使用してオフラインで分割を検証しました。段階的なロールアウトは、信頼が高まるにつれて読み取りモードを通じて進行しました。その比較フェーズでは、シャドウモードにおいて旧経路と新経路によって提供されたバイト数を比較しました。
ソリューション 1 vs ソリューション 2: 比較
次元 時間スライス再パーティショニング (ソリューション 1) ID ごとの動的パーティショニング (ソリューション 2)
粒度 テーブル / 時間スライスレベル 個々の時系列 ID レベル
トリガー パーティションヒストグラム上のバックグラウンドワーカー 読み取り経路で読み取ったバイト数が閾値を超える
影響範囲 未来の時間スライスのみ 既存の不変なワイドパーティション
コアメカニズム time_bucket 間隔の調整 / ターゲット密度の調整 子イベントバケットパーティションへの分割
検出シグナル nodetool tablehistograms percentiles 読み取りごとのバイトカウント、Kafka イベント
最も適している場合 テーブルの大部分が誤ってパーティショニングされている場合 少数の ID がワイドな外れ値である場合
データ移動なし 新規書き込みに対して適用されるのみ 非同期分割; 元のパーティションはフォールバックとして保持
ターゲット / 検証 設定された密度 (2–10 MiB) 分割前後のチェックサム + シャドウ比較
使用例付きユースケース
長期にわたるユーザーアクティビティログ:profileId:123 のように何年にもわたって再生イベントを蓄積すると、パーティションが広くなります。ソリューション 2 ではこれをイベントバケットに分散させるため、ページネーション機能を利用し続けることができます。Netflix はこのアプローチを用いて、500MB を超えるパーティションでも可用性を維持しながらページネーションを実現しました。
デバイスまたは IoT テレメトリ:少数の活発なデバイスがイベント量の大部分を占める場合があります。ソリューション 2 では、テーブル全体を再パーティショニングすることなく、これらのホット ID(識別子)のみを隔離します。
過剰にプロビジョニングされた新しいデータセット:チームが 60 秒ごとのバケットを推測してしまい、10KB に満たないパーティションが作成されてしまうケースがあります。この場合、ソリューション 1 では将来のタイムスライス(Time Slices)に対して間隔を広げ、読み取り増幅を削減します。
レイテンシに敏感なダッシュボード:呼び出し元は完全なデータよりも高速なレスポンスを必要とします。Partial Returns(部分的な返却)では、SLO(サービスレベル目標)で定義された最大許容レイテンシを上限とし、その時点で収集できたデータのみを返却します。
Try It: Interactive Splitter Demo
以下の埋め込み型シミュレーターは、読み取りパスをエンドツーエンドでモデル化しています。パーティションサイズ、検出閾値、および目標とするイベントバケット数を設定してください。読み取りを実行すると、「Detection(検出)」「Planning(計画)」「Splitting(分割)」「Validation(検証)」「Serving(提供)」の各ステップを順に通過します。これにより Kafka での検出イベントとモデル化されたレイテンシの低下が表示されますが、数値は実測値ではなく例示的なものです。
(function(){
window.addEventListener('message',function(e){
if(e.data && e.data.mtpDwpHeight){
var f=document.getElementById('mtp-dwp-frame');
if(f){ f.style.height=e.data.mtpDwpHeight+'px'; }
}
});
})();
Results
広範囲のパーティションに対する平均読み取りレイテンシは、数秒から低二桁ミリ秒に低下しました。テールレイテンシも数秒から約200ms以下まで改善され、読み取りタイムアウトが減少し、Netflix チームはCPU使用率の低下とスレッドキューイングの最小化を報告しています。全体として、Cassandra クラスターはより安定した状態となりました。
極端に広い行に対しては、サービスがページネーションを行いながら500MB以上のパーティションをクエリしても可用性を維持できます。このようなパーティションは以前、恒常的なタイムアウトと可用性の断絶を引き起こしていました。ページネーションされたクエリは成功して返却され、レイテンシの上昇と引き換えに可用性が確保されます:
Copy CodeCopiedUse a different Browser
{
"next_page_token": "...",
"records": [ { "...": "..." } ],
"response_context": [
{
"namespace": "...",
"time_taken": "41.072410142s"
}
]
}
Netflix チームは、可変型の広範囲パーティションの分割や、以前失敗した分割の再処理など、今後の作業をリストアップしています。特に際立つ教訓は二つあります。複雑な変更の表面積を縮小し、段階的にデプロイすることは運用面で大きな効果をもたらします。また、機能の複雑さ、影響範囲(ブラスト・レイディアス)、およびインパクトを考慮すると、信頼性を高めるための仕組みへの投資は正当化されます。
技術詳細はこちらをご覧ください。Twitter でフォローすることもできますので、お気軽にご登録ください。また、150,000人以上が参加するML SubRedditに参加し、ニュースレターも購読してください。待ってください!Telegramをご利用ですか?今ならTelegramでも私たちに参加いただけます。
GitHub リポジトリ、Hugging Face ページ、製品リリース、ウェビナーなどのプロモーションのために弊社とパートナーシップを結ぶ必要がある場合は、ご連絡ください。
本記事「Netflix AI チームが Cassandra パーティションを ID ごとに分割することで、広域パーティションの読み取りレイテンシを数秒からミリ秒に削減」は、MarkTechPost で最初に公開されました。
原文を表示
Netflix’s engineering team published a method for handling wide partitions in Apache Cassandra. The research work targets Netflix’s TimeSeries Abstraction, a platform for temporal event data.
TL;DR
Dynamic partitioning splits wide Cassandra partitions per TimeSeries ID, asynchronously and transparently, with no application changes.
Detection runs on the read path via byte counting and a Kafka event; splitting targets immutable partitions first.
Bloom filters (single-digit microseconds) plus a cached wide_row metadata lookup route reads to the smaller child partitions.
Checksums, retained original partitions, Data Bridge Spark checks, and shadow comparison guard correctness.
Reads improved from seconds to low double-digit milliseconds; tail latency fell to ~200 ms; 500MB+ partitions stayed available.
What is Dynamic Repartitioning?
Netflix’s TimeSeries Abstraction ingests and queries petabytes of temporal event data with millisecond latency. It uses Apache Cassandra 4.x as the underlying storage. Cassandra was chosen for throughput, latency, cost, and operational maturity.
Time-series data is organized into partitions that group events by identifier and time range. These partitions can grow ‘wide’ as events accumulate over time. Dynamic repartitioning splits an oversized partition into smaller child partitions asynchronously. Applications keep querying the same logical partition while the storage layout evolves transparently.
Why Wide Partitions Hurt Reads
For most datasets, average read latency stays in single-digit milliseconds. When partitions grow too wide, tail read latencies rise into seconds. These slow reads can produce read timeouts. In extreme cases, clusters see Garbage Collection pauses, high CPU utilization, and thread queueing.
TimeSeries servers also handle very high read throughput, which compounds the problem. Scaling up the Cassandra cluster is always an option. But Netflix team wanted smarter alternatives than just throwing more money at the problem.
The Partitioning Strategy Behind TimeSeries
TimeSeries breaks datasets into discrete time chunks: Time Slices, time buckets, and event buckets. This lets Netflix team query and drop data by time without creating tombstones. When a namespace (dataset) is created, users specify anticipated workload characteristics. A provisioning pipeline runs Monte Carlo simulations to pick infrastructure and partition configuration.
This up-front approach falls short in three situations. Workload can be unknown or inaccurately estimated early in a project. Workload can also evolve as traffic and product requirements change. Finally, data outliers exist, where a few IDs receive far more events.
Discrete Time Slices provide a natural escape hatch for the first two cases. Each new Time Slice can use a different partitioning strategy. But manually tuning thousands of datasets is not sustainable, so automation is required.
Solution 1: Time Slice Re-Partitioning
Cassandra exposes introspection APIs such as nodetool tablehistograms for partition-size percentiles. A background worker monitors these histograms and exposes them through a Cassandra virtual table. It computes an adjustment factor when partition sizes miss a configured density. That density is often set between 2 MiB and 10 MiB, depending on workload.
For example, provisioning once selected 60-second time buckets, producing partitions under 10 KB. That over-partitioning caused high read amplification and thread queueing. The worker updates future Time Slices with a corrected strategy:
Copy CodeCopiedUse a different Browser
DynamicTimeSliceConfigWorker:
namespace: my_dataset_1
Observed: TimeSlices have p99 partitions below configured target of 10MB.
Proposed: time_bucket interval: 60s -> 604800s
This reduced read latencies and timeouts caused by thread queueing. But it only helps when most of the table warrants re-partitioning. It does not help when only a percentage of IDs are wide. For those partial cases, Netflix team offers three options:
Do Nothing: the right approach when top-level metrics show no impact.
Partial Returns: aborts an in-flight request breaching a latency SLO, returning data collected so far.
Block IDs: an extreme step for test or spam IDs that destabilize the system.
Block IDs is applied through configuration, listing the offending TimeSeries IDs:
Copy CodeCopiedUse a different Browser
dgwts.config.<dataset>.block.Ids: "<tsid-1>, <tsid-2>, <tsid-3>"
These options do not help when valid, important IDs grow wide. Those callers still need every event, which is where Solution 2 applies.
Solution 2: Dynamic Partitioning per ID
Dynamic partitioning is an asynchronous pipeline that splits wide partitions per TimeSeries ID. It operates at the ID level, not the table level. It has three stages: Detection, Planning & Splitting, and Serving Reads.
Detection happens on the read path. Every read tracks bytes read for a partition. When bytes exceed a configured threshold, the server emits an event to Kafka:
Copy CodeCopiedUse a different Browser
{
"time_slice": "data_20260328",
"time_series_id": "profileId:123",
"time_bucket": 7,
"event_bucket": 2,
"immutable": true,
"version": "0"
}
Here, immutable marks a partition no longer receiving writes. The version field is reserved for future use, such as invalidation. Netflix team detects on reads, not writes, because most data never needs splitting. Some reads on wide partitions stay slow for seconds until the pipeline catches up. The initial implementation targets immutable partitions to reduce complexity.
Planning reads the entire partition once to compute an accurate split plan. Checkpointing lets failed planning reads resume from the last saved point. The wide_row metadata table stores split states, checkpoints, and routing information.
Splitting delegates to a strategy such as EventBucketPartitionSplitStrategy. It assigns more event buckets to the same time bucket. For ultra-wide partitions, it caps event buckets to control read amplification. Spreading across partitions still distributes reads over Cassandra replicas.
Validating compares a pre-split checksum against a post-split checksum. A split is marked COMPLETED only when both checksums match. Netflix also tracks pre- and post-split partition sizes to confirm splits are sized well.
The Read Path: Bloom Filters and Metadata Routing
TimeSeries servers periodically load completed split partition-keys into in-memory Bloom filters. Every read checks the Bloom filter, which responds in single-digit microseconds. That check is small enough to be practically invisible to callers. On a hit, the server reads wide_row metadata to route the query:
Copy CodeCopiedUse a different Browser
{
"pre_split_data": {
"time_slice": "data_20260328",
"time_series_id": "6313825",
"time_bucket": 0,
"event_bucket": 2
},
"post_split_data": {
"time_slice": "wide_data_20260328_0",
"event_bucket_partition_strategy": {
"target_event_buckets": 2,
"start_event_bucket": 32
}
}
}
That metadata read is backed by a read-through cache. The existing PartitionReader then serves reads from the smaller split partitions. Reusing the same schema minimizes code changes, and results are merged before returning. The original wide partition is never deleted, providing a safe fallback for partial failures and eventual consistency.
Netflix team also verified splits offline using Data Bridge Spark jobs. A phased rollout advanced through read modes as confidence grew. Its Comparison phase compared bytes served by the old and new read paths in shadow mode.
Solution 1 vs Solution 2: Comparison
DimensionTime Slice Re-Partitioning (Solution 1)Dynamic Partitioning per ID (Solution 2)
GranularityTable / Time Slice levelIndividual TimeSeries ID level
TriggerBackground worker on partition histogramsBytes read exceed a threshold on the read path
Scope of effectFuture Time Slices onlyExisting immutable wide partitions
Core mechanismAdjust time_bucket interval / target densitySplit into child event-bucket partitions
Detection signalnodetool tablehistograms percentilesPer-read byte counting, Kafka event
Best whenMost of the table is mis-partitionedA few IDs are wide outliers
Data movementNone; applies to new writesAsync split; original retained as fallback
Target / validationConfigured density (2–10 MiB)Pre/post-split checksum + shadow comparison
Use Cases With Examples
Long-lived user activity logs: A profileId:123 accumulating years of playback events becomes wide. Solution 2 spreads it across event buckets, so pagination stays available. Netflix paginated 500MB+ partitions while remaining available using this path.
Device or IoT telemetry: A small set of chatty devices dominate event volume. Solution 2 isolates those hot IDs without repartitioning the whole table.
Over-provisioned new dataset: A team guesses 60-second buckets and gets sub-10 KB partitions. Solution 1 widens the interval for future Time Slices, cutting read amplification.
Latency-sensitive dashboards: A caller needs a fast response more than complete data. Partial Returns caps latency at the SLO and returns what was gathered.
Try It: Interactive Splitter Demo
The embedded simulator below models the read path end to end. Set a partition size, a detection threshold, and a target event-bucket count. Running a read walks through Detection, Planning, Splitting, Validation, and Serving. It shows the Kafka detection event and a modeled latency drop; the numbers are illustrative, not measured.
(function(){
window.addEventListener('message',function(e){
if(e.data && e.data.mtpDwpHeight){
var f=document.getElementById('mtp-dwp-frame');
if(f){ f.style.height=e.data.mtpDwpHeight+'px'; }
}
});
})();
Results
Average read latency for wide partitions dropped from seconds to low double-digit milliseconds. Tail latencies fell from several seconds to around 200 ms or better. Read timeouts dropped, and Netflix team reported lower CPU utilization and minimal thread queueing. Overall, the Cassandra clusters became more stable.
For extreme wide rows, the service could paginate and query 500MB+ partitions while remaining available. Such partitions previously caused constant timeouts and unavailability blips. A paginated query returns successfully, trading elevated latency for availability:
Copy CodeCopiedUse a different Browser
{
"next_page_token": "...",
"records": [ { "...": "..." } ],
"response_context": [
{
"namespace": "...",
"time_taken": "41.072410142s"
}
]
}
Netflix team lists future work, including splitting mutable wide partitions and reprocessing previously failed splits. Two lessons stand out. Reducing the surface area of a complex change and deploying incrementally pays off operationally. Investing in confidence-building mechanisms is justified by the feature’s complexity, blast radius, and impact.
Check out the Technical details here. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
The post Netflix AI Team Cuts Wide-Partition Read Latency from Seconds to Milliseconds by Splitting Cassandra Partitions Per ID appeared first on MarkTechPost.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み