Skip to content

feat: scale up connection worker pool based on latency#13384

Open
agrawal-siddharth wants to merge 1 commit into
googleapis:mainfrom
agrawal-siddharth:latency
Open

feat: scale up connection worker pool based on latency#13384
agrawal-siddharth wants to merge 1 commit into
googleapis:mainfrom
agrawal-siddharth:latency

Conversation

@agrawal-siddharth

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a latency-based load metric, timeSinceLastCallback, to ConnectionWorker to track the duration since the oldest in-flight request was sent. This metric is used to determine if a worker is overwhelmed and is integrated into the load comparators for connection routing, with corresponding unit tests added. The review feedback suggests avoiding lock contention in getLoad() by using a volatile timestamp to make the method lock-free, simplifying the comparator bucket calculation using toSeconds(), and maintaining test assertion consistency by using Truth's assertThat instead of JUnit's assertFalse/assertTrue.

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