Fix quota result when all limits were exceeded#1059
Fix quota result when all limits were exceeded#1059agrawroh merged 5 commits intoenvoyproxy:mainfrom
Conversation
|
@yuzisun for initial review |
|
Need to rework the mixed mode. Will ping when it is ready for review. |
integration-test/scripts/quota.sh
Outdated
| exit 1 | ||
| fi | ||
|
|
||
| echo "Wating 1 minute for quota buckets to be refreshed" |
There was a problem hiding this comment.
| echo "Wating 1 minute for quota buckets to be refreshed" | |
| echo "Waiting 1 minute for quota buckets to be refreshed" |
integration-test/scripts/quota.sh
Outdated
|
|
||
| response=$(curl -i -s http://envoy-proxy:8888/quota) | ||
| if [ $? -ne 0 ]; then | ||
| echo "Quota bucket should be refereshed" |
There was a problem hiding this comment.
| echo "Quota bucket should be refereshed" | |
| echo "Quota bucket should be refreshed" |
src/service/ratelimit.go
Outdated
| response.Statuses = make([]*pb.RateLimitResponse_DescriptorStatus, len(request.Descriptors)) | ||
| finalCode := pb.RateLimitResponse_OK | ||
| if isQuotaMode { | ||
| finalCode = pb.RateLimitResponse_OVER_LIMIT |
There was a problem hiding this comment.
Could this behavior be configurable and default to reject ? we may still want to send out and let cloud provider reject as the quota tracking in envoy is best effort and the quota enforcement window may not be exactly aligned with the cloud provider.
There was a problem hiding this comment.
This looks like what shadow mode is doing, unless I misunderstand it.
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: yavlasov <yavlasov@google.com>
Signed-off-by: yavlasov <yavlasov@google.com>
Signed-off-by: yavlasov <yavlasov@google.com>
Signed-off-by: yavlasov <yavlasov@google.com>
Signed-off-by: yavlasov <yavlasov@google.com>
2511527 to
01b1bcc
Compare
|
/lgtm |
Fix results in quota mode when all limits have been exceeded. In this case request should be denied.
Specifically rate limit service will deny the request under following conditions: