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

Incorrect / inconsistent rate limiting response headers #7798

Closed
MuthuVega opened this issue Mar 8, 2023 · 0 comments · Fixed by #7824
Closed

Incorrect / inconsistent rate limiting response headers #7798

MuthuVega opened this issue Mar 8, 2023 · 0 comments · Fixed by #7824

Comments

@MuthuVega
Copy link
Contributor

MuthuVega commented Mar 8, 2023

Below are the rate limiting response headers we get from graphql and rest api calls.

Issues:
Some rate limiting header elements have the prefix X- and some don't - Why ? e.g.
Ratelimit-Limit: 20 and X-Rate-Limit-Limit: 20.00

Duplicate entries present. e.g.
Ratelimit-Limit: 20 and X-Rate-Limit-Limit: 20.00

Ratelimit-limit is set to 20 but the Ratelimit-Remaining is set to 99 as its taking into account the burst values - BUT the burst values aren't being displayed, so the values are a bit confusing / misleading.

graphql:
Access-Control-Allow-Origin: http://127.0.0.1:3028/
Access-Control-Expose-Headers: *
Content-Type: application/json
Content-Type: application/grpc
Date: Tue, 07 Mar 2023 16:11:37 GMT
Ratelimit-Limit: 20
Ratelimit-Remaining: 99
Ratelimit-Reset: 1
Transfer-Encoding: chunked
Vary: Origin
Warning: 199 - “The header ‘X-Vega-Connection’ is deprecated and now defaults to ‘CONNECTED’. It will be removed in a future version. See https://github.com/vegaprotocol/vega/issues/7385#issuecomment-1398719810”
X-Block-Height: 282
X-Block-Timestamp: 1678205496061161000
X-Rate-Limit-Duration: 1
X-Rate-Limit-Limit: 20.00
X-Rate-Limit-Request-Remote-Addr: 127.0.0.1:53573
X-Vega-Connection: CONNECTED

REST:
Content-Encoding: gzip
Content-Length: 589
Content-Type: application/json
Date: Tue, 07 Mar 2023 16:12:39 GMT
Ratelimit-Limit: 20
Ratelimit-Remaining: 99
Ratelimit-Reset: 1
Vary: Origin
Warning: 199 - “The header ‘X-Vega-Connection’ is deprecated and now defaults to ‘CONNECTED’. It will be removed in a future version. See https://github.com/vegaprotocol/vega/issues/7385#issuecomment-1398719810”
X-Block-Height: 345
X-Block-Timestamp: 1678205558227499000
X-Rate-Limit-Duration: 1
X-Rate-Limit-Limit: 20
X-Rate-Limit-Request-Remote-Addr: 127.0.0.1
X-Vega-Connection: CONNECTED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants