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

http: select stable stream ID source based on route table #246

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

mattklein123
Copy link
Member

We've gone through a few different iterations of how we select the stable
random ID uses for request routing. We used to use a random number for all
requests, but this yields a performance hit when there is no need for a
true random number. Then we switched to an incrementing ID which gives
approximate randomness at high RPS, but is confusing for new users and in
certain cases does not really provide the expected behavior.

In this commit we implement both cases. If the route table does not use
runtime we use the fast approach. If it uses runtime, we use a real random
number which will provide behavior that most people would expect.

We've gone through a few different iterations of how we select the stable
random ID uses for request routing. We used to use a random number for all
requests, but this yields a performance hit when there is no need for a
true random number. Then we switched to an incrementing ID which gives
approximate randomness at high RPS, but is confusing for new users and in
certain cases does not really provide the expected behavior.

In this commit we implement both cases. If the route table does not use
runtime we use the fast approach. If it uses runtime, we use a real random
number which will provide behavior that most people would expect.
@mattklein123
Copy link
Member Author

@lyft/network-team @rshriram

@louiscryan
Copy link

louiscryan commented Nov 29, 2016 via email

@mattklein123
Copy link
Member Author

@louiscryan no, he didn't. Any help/guidance appreciated on this.

@louiscryan
Copy link

louiscryan commented Nov 29, 2016 via email

@mattklein123
Copy link
Member Author

@louiscryan interesting. Thanks, makes sense. I will open a different issue to track improving how we do PRNG.

@mattklein123 mattklein123 mentioned this pull request Nov 29, 2016
@mattklein123 mattklein123 merged commit 0eedadf into master Nov 29, 2016
@mattklein123 mattklein123 deleted the request_id branch November 29, 2016 19:10
duderino referenced this pull request in duderino/envoy Oct 12, 2019
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora pushed a commit to PiotrSikora/envoy that referenced this pull request Aug 2, 2020
* format fix

Signed-off-by: Kuat Yessenov <kuat@google.com>

* ecds: fix a flake in the integration test (envoyproxy#12268)

Signed-off-by: Kuat Yessenov <kuat@google.com>

* format fix

Signed-off-by: Kuat Yessenov <kuat@google.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
* build: Update bazel to 0.28.0

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Remove rules_foreign_cc override

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Change depset to list

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Update rules_apple

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Update rules_apple to HEAD

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
* build: Update bazel to 0.28.0

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Remove rules_foreign_cc override

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Change depset to list

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Update rules_apple

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>

* Update rules_apple to HEAD

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: JP Simard <jp@jpsim.com>
arminabf pushed a commit to arminabf/envoy that referenced this pull request Jun 5, 2024
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