Skip to content

Commit 46ba75a

Browse files
committed
docs: tighten renderer tuning guidance
1 parent 2cfb1a2 commit 46ba75a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/oss/configuration/configuration-pro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ReactOnRailsPro.configure do |config|
101101
# Under standard Puma streaming, `Sync {}` creates a per-request scheduler and the client is
102102
# cleaned up when that response ends; the limit still applies within the streaming request.
103103
# Without a scheduler (non-streaming paths), a client is created per request. See
104-
# "Renderer performance tuning for streamed RSC" below.
104+
# "Renderer Performance Tuning for Streamed RSC" below.
105105
# Default for `renderer_http_pool_size` is 10
106106
config.renderer_http_pool_size = 10
107107

@@ -202,15 +202,15 @@ Guidance:
202202

203203
- Keep `renderer_http_pool_size` close to (and generally not far above) `workersCount`; sending many more concurrent streams than there are workers just queues renders at the renderer.
204204
- Account for your Rails concurrency: with many Puma threads/workers all streaming, a renderer with only one or two workers becomes the bottleneck. Scale `workersCount` (and renderer replicas) to your real concurrent streamed-render load.
205-
- Raise `ssr_timeout` for long-running streamed responses — it is the per-read socket timeout for the streaming connection.
205+
- Raise `ssr_timeout` for long-running streamed responses — it is the socket idle timeout for the streaming connection. It fires when the renderer sends no data for `ssr_timeout` seconds, not when the total response duration exceeds that value.
206206

207207
### 3. Rails ↔ renderer keep-alive (already on for streaming)
208208

209209
Connection reuse is automatic when the renderer request runs under a long-lived `Fiber.scheduler`, such as Falcon or Puma configured with an async scheduler. In that setup, the async-http client is stored on the scheduler and reused across streaming requests, so HTTP/2 connections stay alive and renders multiplex over them instead of paying TCP/TLS setup per request (issue #3283). No React on Rails configuration is required to enable this.
210210

211211
Under standard Puma, the streaming helper's `Sync {}` block creates a per-request scheduler. The async-http client is cleaned up when that streaming response ends, so connection reuse does not persist across consecutive Rails requests. The benefit is still meaningful inside a single streamed response: renderer calls in that response can share the same client lifecycle and `renderer_http_pool_size` still bounds concurrent HTTP/2 streams.
212212

213-
`config.renderer_http_keep_alive_timeout` is **deprecated** and ignored: the async-http adapter manages connection lifecycle automatically (connections are reused within the scheduler and cleaned up when it ends). Setting it only logs a deprecation warning.
213+
`config.renderer_http_keep_alive_timeout` is **deprecated** and ignored: the async-http adapter manages connection lifecycle automatically (connections are reused within the scheduler and cleaned up when it ends). Setting it to a non-`nil` value logs a deprecation warning; setting it to `nil` is silent.
214214

215215
To confirm reuse, compare before/after `responseEnd` timing and streamed RSC performance marks, and trace renderer sockets when you need to distinguish long-lived scheduler reuse from standard Puma's per-request scheduler cleanup.
216216

llms-full.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18102,7 +18102,7 @@ ReactOnRailsPro.configure do |config|
1810218102
# Under standard Puma streaming, `Sync {}` creates a per-request scheduler and the client is
1810318103
# cleaned up when that response ends; the limit still applies within the streaming request.
1810418104
# Without a scheduler (non-streaming paths), a client is created per request. See
18105-
# "Renderer performance tuning for streamed RSC" below.
18105+
# "Renderer Performance Tuning for Streamed RSC" below.
1810618106
# Default for `renderer_http_pool_size` is 10
1810718107
config.renderer_http_pool_size = 10
1810818108

@@ -18203,15 +18203,15 @@ Guidance:
1820318203

1820418204
- Keep `renderer_http_pool_size` close to (and generally not far above) `workersCount`; sending many more concurrent streams than there are workers just queues renders at the renderer.
1820518205
- Account for your Rails concurrency: with many Puma threads/workers all streaming, a renderer with only one or two workers becomes the bottleneck. Scale `workersCount` (and renderer replicas) to your real concurrent streamed-render load.
18206-
- Raise `ssr_timeout` for long-running streamed responses — it is the per-read socket timeout for the streaming connection.
18206+
- Raise `ssr_timeout` for long-running streamed responses — it is the socket idle timeout for the streaming connection. It fires when the renderer sends no data for `ssr_timeout` seconds, not when the total response duration exceeds that value.
1820718207

1820818208
### 3. Rails ↔ renderer keep-alive (already on for streaming)
1820918209

1821018210
Connection reuse is automatic when the renderer request runs under a long-lived `Fiber.scheduler`, such as Falcon or Puma configured with an async scheduler. In that setup, the async-http client is stored on the scheduler and reused across streaming requests, so HTTP/2 connections stay alive and renders multiplex over them instead of paying TCP/TLS setup per request (issue #3283). No React on Rails configuration is required to enable this.
1821118211

1821218212
Under standard Puma, the streaming helper's `Sync {}` block creates a per-request scheduler. The async-http client is cleaned up when that streaming response ends, so connection reuse does not persist across consecutive Rails requests. The benefit is still meaningful inside a single streamed response: renderer calls in that response can share the same client lifecycle and `renderer_http_pool_size` still bounds concurrent HTTP/2 streams.
1821318213

18214-
`config.renderer_http_keep_alive_timeout` is **deprecated** and ignored: the async-http adapter manages connection lifecycle automatically (connections are reused within the scheduler and cleaned up when it ends). Setting it only logs a deprecation warning.
18214+
`config.renderer_http_keep_alive_timeout` is **deprecated** and ignored: the async-http adapter manages connection lifecycle automatically (connections are reused within the scheduler and cleaned up when it ends). Setting it to a non-`nil` value logs a deprecation warning; setting it to `nil` is silent.
1821518215

1821618216
To confirm reuse, compare before/after `responseEnd` timing and streamed RSC performance marks, and trace renderer sockets when you need to distinguish long-lived scheduler reuse from standard Puma's per-request scheduler cleanup.
1821718217

0 commit comments

Comments
 (0)