-
Notifications
You must be signed in to change notification settings - Fork 24
Rate limiting comparison.md
This topic helps you understand which rate limiting policies to use for your API.
##About rate limiting
Apigee-127 provides two mechanisms that enable you to optimize traffic management to minimize latency for apps while maintaining the health of backend services: spike arrest and quota. Each mechanism addresses a distinct aspect of traffic management. In some cases, you might use both quota and spike arrest in a single API.
##What is spike arrest?
A spike arrest policy protects against traffic spikes and offers protection against threats such as denial of service attacks. It throttles the number of requests an API can process by "smoothing" the number of calls that can be processed over a specified time interval.
For details about the spike arrest algorithm, see the Spike arrest deep dive topic.
##What is a quota?
A quota enforces consumption limits on client apps by maintaining a distributed 'counter' that tallies incoming requests. The counter can tally API calls for any identifiable entity, including apps, developers, API keys, access tokens, and so on.
Quotas are typically used to enforce business contracts or SLAs with developers and partners, rather than for operational traffic management. For example, paying customers might have a larger quota than "freemium" (non-paying) users.
##Side-by-side comparisons
####When to use?
Spike arrest -- Protect your API proxy's target backend against severe traffic spikes and denial of service attacks.
Quota -- Limit the number of connections apps can make to your API proxy's target backend over a specific period of time.
####When not to use
Spike arrest -- Don't use it to count and limit the number of connections apps can make to your API proxy's target backend over a specific period of time. For that, use the Quota policy.
Quota -- Don't use it to protect your API proxy against traffic spikes. For that, use the Spike Arrest policy or Concurrent Rate Limit policy.
####Stores a count?
Spike arrest -- No
Quota -- Yes
####Supports distributed message processing?
Spike arrest -- No
Quota -- Yes
##Related information
Having Trouble? Try posting your question to the Apigee Community. Or, for more links and resources, check out our Help Page
Need help? Visit the Apigee Community ! |
---|
-
Getting started
-
Add policies to your API
-
Add security policies
-
Deploy your projects
-
Programmatic hooks
-
Good to know about
-
Deep dives
-
Reference topics
-
Troubleshooting and getting help
-
Related resources