Client does not complete send operation until async block of code is reached

オープン
#2,996 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript
領域
api, networking

調査の方向性

http2Stream!.write(message, cb) を呼び出す @grpc-js の呼び出しパスから開始し、報告された周期的な 500ms クライアントワークフローを再現に使用します。次の非同期ブロックに入る前に、キューに入れられたメッセージとコールバックが進行するかを確認します。完了とは、各小さなメッセージが無関係な非同期コードを待たずに予定どおりサーバーへ到達することを意味します。

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

説明

package: @grpc/grpc-js

We've noticed a performance issue with @grpc-js in our performance logging workflow. It's set up so that a client periodically sends small messages to a server every 500ms. Unfortunately, the server does not receive any of these until the client process reaches an async block of code, at which point all previously queued messages are sent in a massive burst. The messages stay in a sort of queue for however long it takes to reach the next await block, which in our scenario takes up to a minute.
After some debugging, we've found that http2Stream!.write(message, cb) is indeed successfully called immediately after every send request, but that the operation is not performed and the cb is not invoked until the next block of async code.
This is not a question of performance - 500ms is more than enough time to send and receive a small message between local processes.

主要言語
TypeScript
スター
4.8k
フォーク
720
平均マージ
2日 17時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

grpc/grpc-node のほかの issue

grpc/grpc-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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