Consider disabling WebSocket message splitting when permessage-deflate is off
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- typescript, vscode
調査の方向性
まず ipc.net.ts を確認し、特に MaxWebSocketMessageLength と、issue で説明されている enableMessageSplitting の動作を確認します。高遅延の proxied 接続で splitting するパスと splitting しないパスを比較し、そのうえで、完了の意味を CLI で設定可能な設定とするのか、レイテンシーおよび圧縮の安全性チェックによって裏付けられたデフォルト値の変更とするのかを定義します。
索引モデルが issue の本文から書いたものです。
説明
WebSocket message splitting adds significant latency for large files on proxied connections
When serving code-server behind a proxy (which is the common production deployment), the 256KB WebSocket message splitting introduced in microsoft/vscode#174278 multiplies per-message RTT overhead significantly for large file operations like image previews.
Background
VS Code splits large IPC messages into 256KB chunks (MaxWebSocketMessageLength = 256 * 1024 in ipc.net.ts) to avoid blocking the Node.js event loop during zlib compression. Each chunk becomes a separate WebSocket message.
The latency problem in proxied deployments
In a proxied deployment (e.g. a gateway in front of a devbox), each WebSocket message incurs a full round-trip. With 100ms RTT between the proxy and the devbox:
- A 10MB file generates ~40 chunks (10MB ÷ 256KB)
- Each chunk = one WebSocket message = one round-trip
- Total overhead: ~40 × 100ms = ~4 seconds of pure latency
We tested image preview times (time from opening a file in the explorer to the image fully rendering) across different file sizes at 100ms simulated RTT:
| File size | Splitting ON | Splitting OFF | Improvement |
|---|---|---|---|
| 145 KB | 2,212ms | 2,251ms | ~0% |
| 1 MB | 1,988ms | 1,707ms | 14% |
| 1.5 MB | 2,093ms | 1,412ms | 33% |
| 5.6 MB | 4,255ms | 2,193ms | 48% |
| 10.3 MB | 7,262ms | 2,888ms | 60% |
Is disabling splitting safe? (Does zlib actually block?)
A few basic tests didn't seem to indicate this issue in our case, but more investigation may be needed
Question
Would you consider making enableMessageSplitting configurable via a CLI flag, or defaulting it to false for single-user deployments?
Happy to submit a PR if there's agreement on the right approach.
- 主要言語
- TypeScript
- スター
- 79.4k
- フォーク
- 6.9k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 39
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/code-server のほかの issue
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
coder/code-server#8013 · コメント 3 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7976 · コメント 2 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7962 · コメント 3 件 ·
-
bug needs-investigation
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
coder/code-server#7955 · コメント 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
coder/code-server#7948 · コメント 1 件 · リアクション 2 件 ·
coder/code-server の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100