Say what handing a parked connection over costs

This commit is contained in:
yhirose committed 2026-11-21 11:18:32 -05:00
1 parent 0289c0f528
commit 76e1a9c4c9
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ With keep-alive parking, a connection waiting for its next request is handed to
What changes with it:
- Consecutive requests on one connection may run on different threads, so don't keep per-connection state in `thread_local` variables.
- With no more connections than threads and very light handlers, handing the connection over can lower the requests served per second.
- Handing the connection over to a worker adds roughly 10-20 µs to each request. It only shows with very light handlers and a client as near as loopback.
- A handler, a content provider and a WebSocket still hold their thread while they run.
The full list is in the [README](https://github.com/yhirose/cpp-httplib/blob/master/README.md#keep-alive-parking).
+1 -1
View File
@@ -65,7 +65,7 @@ Keep-Aliveのパーキングを有効にすると、次のリクエストを待
有効にすると変わること:
- 同じ接続の連続するリクエストが、別々のスレッドで処理されることがあります。接続ごとの状態を`thread_local`変数に持たせないでください。
- 接続数がスレッド数以下で、ハンドラがとても軽い場合は、接続の受け渡しのぶん毎秒の処理数が下がることがあります。
- ワーカーへの接続の受け渡しで、1リクエストあたり10〜20µsほど時間が増えます。目立つのは、ハンドラがとても軽く、クライアントがループバック並みに近いときだけです。
- ハンドラ、コンテンツプロバイダ、WebSocketは、実行中は今までどおりスレッドを占有します。
すべての変更点は[README](https://github.com/yhirose/cpp-httplib/blob/master/README.md#keep-alive-parking)にあります。