Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orca: replace uint64 rps with double rps_fractional #54

Merged
merged 5 commits into from
Jan 5, 2023

Conversation

markdroth
Copy link
Contributor

@markdroth markdroth commented Dec 15, 2022

Signed-off-by: Mark D. Roth roth@google.com

Need to represent this as a double to avoid rounding error in low-RPS services, which can greatly skew endpoint weights based on this value.

CC @yousukseung

Signed-off-by: Mark D. Roth <roth@google.com>
@markdroth markdroth requested a review from htuch December 15, 2022 15:57
Signed-off-by: Mark D. Roth <roth@google.com>
Copy link

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

LGTM, modulo comment nit.
I don't really understand why double is preferred, especially as other places in the API rps/qps are int-based AFAICT. Maybe add some background details in the field's doc-string or in the PR description.

xds/data/orca/v3/orca_load_report.proto Outdated Show resolved Hide resolved
Signed-off-by: Mark D. Roth <roth@google.com>
@markdroth
Copy link
Contributor Author

I've updated the PR description to explain this.

adisuissa
adisuissa previously approved these changes Dec 19, 2022
Copy link

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

Thanks, left one small nit, but otherwise LGTM.

xds/data/orca/v3/orca_load_report.proto Outdated Show resolved Hide resolved
Signed-off-by: Mark D. Roth <roth@google.com>
adisuissa
adisuissa previously approved these changes Dec 19, 2022
Copy link

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!
/lgtm api


// Total QPS being served by an endpoint. This should cover all services that an endpoint is
// responsible for.
double qps = 6 [(validate.rules).double.gte = 0];
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with the move to double, that makes sense for stats, but I'm less enthusiastic about switching from RPS to QPS terminology as the way to distinguish the fields. They are synonyms, and a large chunk of the world uses RPS, whereas Google uses QPS and Envoy / xDS has significant influence from this.

We should pick RPS / QPS as the xDS preferred standard, and put it in a style guide at the very least.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have any strong feeling about the preferred terminology, but given that the existing field here is called rps, we can't reuse that name without making a breaking change.

It might turn out that no one is actually using the existing field yet, in which case we could make a breaking change and no one would care. But we need this new field on a fairly tight timeline, so I'd prefer not to risk the need for a revert if we try it and encounter a problem later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per our offline conversation, I've renamed qps to rps_fractional.

Signed-off-by: Mark D. Roth <roth@google.com>
@markdroth markdroth changed the title orca: replace uint64 rps with double qps orca: replace uint64 rps with double rps_fractional Jan 5, 2023
@markdroth markdroth merged commit 06c439d into cncf:main Jan 5, 2023
@markdroth markdroth deleted the orca_update branch January 5, 2023 20:26
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.

None yet

3 participants