-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(proxy-mirror): support mirror requests sample_ratio #4965
Conversation
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.
Could you give some use cases about this feature?
|
Personally, I prefer to sample randomly than sample the first N. As,
What about your opinion? |
Thanks for your careful review and suggestions firstly~ 😄 |
random +1 |
I think a random sample is better than the current way. Also, if we support these rate-limiting ways, we have to change multiple plugins in the future if new rate-limiting algorithms are introduced, and it's prone to be inconsistent on the configurations items. |
Will use random sampling percentages to achieve this function~ @spacewander @tokers @tzssangglass |
Co-authored-by: tzssangglass <tzssangglass@gmail.com>
Try this patch?
|
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Since the patch is so big, I decide to push it to this branch instead (also trigger the CI) |
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This reverts commit d5276c1.
According to the error.log, it seems that the mirror request may not finish when the HTTP request is done. So just check it in the error log Signed-off-by: spacewander <spacewanderlzx@gmail.com>
According to the error.log, it seems that the mirror request may not |
okay~ thanks a lot~ |
What this PR does / why we need it:
support mirror requests sample_ratio
use case:
In the simulation environment, user hope to use a small amount of real traffic to verify the new function, but the real traffic may be huge, which puts great pressure on the simulation service.
Fix #3753
Pre-submission checklist: