-
Notifications
You must be signed in to change notification settings - Fork 528
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
Hedgin Bets and Requests #750
Conversation
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. Minor thing: 2nd param to the NewClient
can be extracted to a named const, will be easier to get what 2
means.
Signed-off-by: Joe Elliott <[email protected]>
Made a minor change with params validation, no other changes https://github.com/cristalhq/hedgedhttp/releases/tag/v0.5.0 Also @storozhukBM suggested that No sooner said than done - https://github.com/cristalhq/synx/blob/main/hedged.go but not tested and well designed yet. Will be polished next week(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing 🚀
One more thought:
- Should we add a metric on number of hedged requests that we can track?
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
@grafana/tempo Please re-review
This is ready to go from my perspective. |
Signed-off-by: Joe Elliott <[email protected]>
Signed-off-by: Joe Elliott <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 Left some remarks, nothing blocking.
Also kudos for the tests, this kind of stuff is tricky to test 🙂
@@ -9,4 +13,5 @@ type Config struct { | |||
Endpoint string `yaml:"endpoint-suffix"` | |||
MaxBuffers int `yaml:"max-buffers"` | |||
BufferSize int `yaml:"buffer-size"` | |||
HedgeRequestsAt time.Duration `yaml:"hedge-requests-at"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not specific to this PR: I noticed this config uses kebab-case instead of snake_case like the other configs. Is this intentional? Is this just some debt we can't get rid of anymore now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i noticed this for the first time adding this config option. i think everything is snake except for this azure config. we should consider a breaking change PR where we move azure to the same standard as everything else.
Signed-off-by: Joe Elliott <[email protected]>
@joe-elliott |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cristaloleg @storozhukBM for the super useful library and great collaboration 🚀
I agree we can move ahead with this, I'll open an issue for the metrics that we can work on in the future.
What this PR does:
Hedges GCS/S3/Azure requests using this library.
This currently only supports s3 and gcs. Azure does not seem to give access to http transport so I'm not sure if we can use this solution there. This PR is ready for review but I'm still evaluating options for adding tests.Azure support added!
Using a
hedge_requests_at
value of500ms
seeing the following impact in ops:frontend latency:
gcs requests/second:
Thx to @cristaloleg and @storozhukBM for their help in getting hedgedhttp to support GCS/HTTP2.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]