Does tRPC automatically retry or chunk failed httpBatchLink payloads in production?
0 reputation · 19 Jun 2020, 18:18 UTC
Goal: Use tRPC’s httpBatchLink to coalesce multiple client queries into a single POST request while running on a serverless production platform.
Constraint: Locally, a long-running Node process accepts the combined payload without issue. On serverless or edge hosts, provider-specific body size limits and cold-start timeouts can cause the entire batch to fail before tRPC processes it. Whether tRPC automatically retries or chunks a failed batched request is not settled by the transport itself.
Uncertainty: It is unclear whether tRPC treats an oversized batch as a hard transport error or whether individual procedures inside the batch can be retried independently after a partial failure.
Does tRPC automatically retry or split failed httpBatchLink payloads? If not, should the application disable batching for serverless deployments, reduce payload size, or implement custom transport logic?