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

[Bug] Throttle client requests on API management, in case of high traffic. #385

Closed
3 tasks
manishsat opened this issue Nov 4, 2019 · 6 comments
Closed
3 tasks

Comments

@manishsat
Copy link
Contributor

Describe the bug

Throttle client requests on API management, in case of high traffic.

Area

  • Install script
  • Update script
  • Service

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Log files

Screenshots

Additional context

@manishsat manishsat added the bug label Nov 4, 2019
@ghost ghost added the status: new label Nov 4, 2019
@ghost ghost assigned smoralesd Nov 4, 2019
@AhmedAbdoOrtiga
Copy link
Contributor

AhmedAbdoOrtiga commented Nov 4, 2019

Here's the information I shared in the Team chat before, I think it'll be helpful:

We can use API Management access restriction policies to do that, there's four policies I think we might need to consider using (2 of them are unavailable in consumption tier of API Management):

1- Limit call rate by subscription: The rate-limit policy prevents API usage spikes on a per subscription basis by limiting the call rate to a specified number per a specified time period. When this policy is triggered the caller receives a 429 Too Many Requests response status code.

2- Limit call rate by key(unavailable in consumption tier of API Management): The rate-limit-by-key policy prevents API usage spikes on a per key basis by limiting the call rate to a specified number per a specified time period. The key can have an arbitrary string value and is typically provided using a policy expression. Optional increment condition can be added to specify which requests should be counted towards the limit. When this policy is triggered the caller receives a 429 Too Many Requests response status code.

3- Set usage quota by subscription: The quota policy enforces a renewable or lifetime call volume and/or bandwidth quota, on a per subscription basis.

4- Set usage quota by key(unavailable in consumption tier of API Management): The quota-by-key policy enforces a renewable or lifetime call volume and/or bandwidth quota, on a per key basis. The key can have an arbitrary string value and is typically provided using a policy expression. Optional increment condition can be added to specify which requests should be counted towards the quota. If multiple policies would increment the same key value, it is incremented only once per request. When the call limit is reached, the caller receives a 403 Forbidden response status code.

For more info:

https://docs.microsoft.com/en-us/azure/api-management/api-management-sample-flexible-throttling

https://docs.microsoft.com/en-us/azure/api-management/transform-api

https://docs.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies

image

image

@ghost
Copy link

ghost commented Nov 4, 2019

This issue has been marked as ready for team triage; we will triage it in our weekly review and update the issue. Thank you for contributing to Accessibility Insights!

@markreay
Copy link
Member

Will be addressed in performance feature. Will close once details have been transferred there.

@ferBonnin
Copy link

@lamaks @manishsat per the comment below, do we still need this bug?

@ghost
Copy link

ghost commented Jul 24, 2020

The team requires additional author feedback; please review their replies and update this issue accordingly. Thank you for contributing to Accessibility Insights!

@ghost
Copy link

ghost commented Jul 28, 2020

This issue has been automatically marked as stale because it is marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for contributing to Accessibility Insights!

@ghost ghost closed this as completed Aug 1, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants