PostHog / PostHog/posthog-python
Backpressure when queue is full
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 61
- フォーク
- 82
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 71
説明
We uncovered a case where a key customer was losing events due to the way this library is configured/built.
With the flush_interval=2 (default is 0.5), flush_at=100 and max_queue_size=1000 (default 10k), their queue got full during peak hours and they started dropping events.
Their recommended solution is very reasonable:
Ideally the library would provide back pressure by blocking/waiting for acknowledgement when flushing a batch of events vs having to configure a max_queue_size.
We should implement some way to block when the queue is full, or some way to let the user know the queue size.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイル、テスト、エントリーポイントのいずれも指定されていません。まず、flush_interval、flush_at、max_queue_size がイベント配信をどのように制御しているかを追跡し、そのうえで、意図された動作がキューが満杯のときにブロックすることなのか、キューのサイズを公開することなのかを明確にしてください。完了条件には、キューが満杯の場合の動作の定義と、報告されたイベント喪失のケースに対するカバレッジを含める必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend, data
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100