Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add retry with exponential backoff to thrift server socket binding#693

Merged
ursetta-netflix merged 1 commit into
masterfrom
thrift-init-retry
Apr 7, 2026
Merged

Add retry with exponential backoff to thrift server socket binding#693
ursetta-netflix merged 1 commit into
masterfrom
thrift-init-retry

Conversation

@ursetta-netflix

Copy link
Copy Markdown
Collaborator

Thrift server startup intermittently fails (~5%) on fresh container startup with TTransportException when binding to the configured port. This is likely caused by a race with container networking or port TIME_WAIT from IP reuse.

Wrap TServerSocket creation in a Guava Retryer (5 attempts, exponential backoff capped at 30s) to handle transient bind failures gracefully.

Thrift server startup intermittently fails (~5%) on fresh container startup
with TTransportException when binding to the configured port. This is likely
caused by a race with container networking or port TIME_WAIT from IP reuse.

Wrap TServerSocket creation in a Guava Retryer (5 attempts, exponential
backoff capped at 30s) to handle transient bind failures gracefully.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

@gtrettenero gtrettenero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if we still see some issues even with the retryer we might want to dive into the race condition you mentioned to avoid the transient error in the first place

@ursetta-netflix ursetta-netflix marked this pull request as ready for review April 7, 2026 16:32
@ursetta-netflix ursetta-netflix merged commit deb6743 into master Apr 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants