{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by Yaniv Yemini · May 06, 2015 at 07:58 AM · 562 Views api proxyquotarateconcurrent

Limiting concurrent requests per token

Hello,

We need to limit the number of concurrent requests sent per customer (token) to our API. How can we implement this via Apigee? The concurrent rate policy does not provide a method to limit per customer.

thanks,

Yaniv

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

4 Answers

  • Sort: 
avatar image
0

Answer by Yaniv Yemini · May 07, 2015 at 07:34 AM

Spike Arrest provides request rate limiting, however, we are looking for limiting the number of the number of requests that are currently being processed in the backend for a specific token.

For example:

We would like to allocate 2 simultaneous requests to user A. So there will be no more than 2 connections open to the backed user for that user at any time.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sudheendras ♦   · May 11, 2015 at 04:51 AM 0
Link

Sorry, your question "We need to limit the number of concurrent requests sent per customer (token) to our API." ... made be think that you want to limit requests to APIs at Apigee layer. Thanks for the clarification.. However I don't think there is a straight forward way to implement this request.

avatar image
0

Answer by Yaniv Yemini · May 07, 2015 at 04:03 PM

The quota policy does not meet our requirement since each request can have a different processing time, and if a user sends all requests at the same time (but still does not use all the quota) they can use more than the concurrent requests that are allowed on the backend.

For example: if we allocate 1 concurrent request to a token, the client should not be able to send another request until the first request has been completed.

Another example: If we allocate 2 processing concurrent requests in our backend for each user -

Let's say there are 2 requests from the same token (user) entering APIgee:

1. Request that will be processed for 5 seconds

2. Request that will be processed for 30 seconds

In case a third request from the same token enters Apigee, it should be rejected in case both requests above (#1 and #2) are still being processed by the backend.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by sudheendras   · May 06, 2015 at 02:30 PM

If you are requirement is to throttle the number of requests processed by an API proxy and sent to a backend, use Spike Arrest policy.

Eg -

<SpikeArrest async="false" continueOnError="false" enabled="true" name="Spike-Arrest-1">
    <DisplayName>Spike Arrest</DisplayName>
    <Rate>30ps</Rate>
    <Identifier ref="YOUR_TOKEN_ATTRIBUTE_HEADER"/>
</SpikeArrest>
Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by pdani · May 07, 2015 at 01:01 PM

Quota policy is the best bet in this case. Quota policy will let you allocate different quotas for # of requests per second allowed for each user/org.

The way to do this would to to create apps for each user/org and allocate custom attributes in each app with each org simultanious request processing limits. Then in the quota policy, refer to these limits to enforce limits for each user/org.

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Concurrent Rate Limit per API Key 2 Answers

How to set isHTTPStatusTooManyRequestEnabled to return 429 http response 12 Answers

Configuring the Quota policy to check all products applying to this API proxy 1 Answer

Quota policy per request parameters 2 Answers

Please suggest me how to get rid of extra characters that are getting generated when i create a API proxy for a service with query parameters.Thanks in Advance. 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges