grpc / grpc/grpc-java

Allow for batching writes to the framer

オープン
#502 コメント 30 件 リアクション 0 件 担当者 0 名 GitHub で見る
performance
主要言語
Java
スター
12.1k
フォーク
4k
平均マージ
2日 17時間
マージ済み PR(30日)
37

説明

Need to allow applications to perform a sequence of writes that cause a single flush in the framer to improve throughput.

The typical example for this would be an application thats wants to write messages until isReady() is false and to do more writes when onReady() is called. Even if the application is not flow-control aware (i.e is not using isReady) it would still be useful to allow write batching for bursty streams

One simple option for doing this would be to delay the outbound framer flush while executing onPayload/isReady callbacks though this would only help cases where sends are done inside these callbacks by the same thread. A more thorough API change is probably warranted.

To give some performance context the change described above allows the FlowControlledMessagesPerSecondBenchmark to go from ~700kqps to ~4Mqps on my box

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、issue で言及されている onPayload/isReady コールバック周辺の outbound framer の flush と、FlowControlledMessagesPerSecondBenchmark を追跡します。連続した書き込みを 1 回の flush にまとめる API またはコールバックの動作を定義して検証します。これには、フロー制御されたストリームとバースト性のあるストリームを含め、その後ベンチマーク結果を比較します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
networking
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。