Default polling workers to CPU-based connection count (Option B: CPU-scaled)#1249
Open
LukeButters wants to merge 1 commit into
Open
Default polling workers to CPU-based connection count (Option B: CPU-scaled)#1249LukeButters wants to merge 1 commit into
LukeButters wants to merge 1 commit into
Conversation
Polling Tentacle workers previously defaulted to 1 TCP connection, serialising all RPC calls. Under load (e.g. DRB), RPCs queue in Halibut's Pending Request Queue and time out — causing deployment failures. This PR implements Option B from the RFC: the default connection count scales with available CPU cores (clamped to [2, 8]). A 4-core machine gets 4 connections; a 1-core machine gets 2 (minimum); machines with many cores are capped at 8. The TentaclePollingConnectionCount env var still overrides this default. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[2, 8].TentaclePollingConnectionCountenv var still overrides the default; Halibut'sMaximumActiveTcpConnectionsPerPollingSubscriptioncap remains in place as a server-side safeguard.Test plan
TentaclePollingConnectionCount=1env var still overrides to 1 connectionTentaclePollingConnectionCount=10is clamped to 8🤖 Generated with Claude Code