You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/oss/configuration/configuration-pro.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ ReactOnRailsPro.configure do |config|
101
101
# Under standard Puma streaming, `Sync {}` creates a per-request scheduler and the client is
102
102
# cleaned up when that response ends; the limit still applies within the streaming request.
103
103
# 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.
105
105
# Default for `renderer_http_pool_size` is 10
106
106
config.renderer_http_pool_size =10
107
107
@@ -202,15 +202,15 @@ Guidance:
202
202
203
203
- 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.
204
204
- 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.
206
206
207
207
### 3. Rails ↔ renderer keep-alive (already on for streaming)
208
208
209
209
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.
210
210
211
211
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.
212
212
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.
214
214
215
215
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.
Copy file name to clipboardExpand all lines: llms-full.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -18102,7 +18102,7 @@ ReactOnRailsPro.configure do |config|
18102
18102
# Under standard Puma streaming, `Sync {}` creates a per-request scheduler and the client is
18103
18103
# cleaned up when that response ends; the limit still applies within the streaming request.
18104
18104
# 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.
18106
18106
# Default for `renderer_http_pool_size` is 10
18107
18107
config.renderer_http_pool_size = 10
18108
18108
@@ -18203,15 +18203,15 @@ Guidance:
18203
18203
18204
18204
- 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.
18205
18205
- 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.
18207
18207
18208
18208
### 3. Rails ↔ renderer keep-alive (already on for streaming)
18209
18209
18210
18210
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.
18211
18211
18212
18212
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.
18213
18213
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.
18215
18215
18216
18216
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.
0 commit comments