Open renuka-fernando opened 1 year ago
Application level and subscription level rate limit policies (for eg: 10 requests per min) is early rate limited for graphQL APIs.
{ human(id: 1000) { id name } droid(id: 2000) { name friends { name appearsIn } } }
Here it looks like APIM publishes events to TM for each operation contained in the graphQL request body.
https://github.com/wso2/carbon-apimgt/blob/2c7788e5914c457e55a251aa4d6cd20c30b401ef/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/throttling/ThrottleHandler.java#L403-L411
APIM
4.2.0-alpha
Java version: 11.0.16.1, vendor: Eclipse Adoptium OS name: "mac os x", version: "12.6", arch: "aarch64", family: "mac"
No response
https://github.com/wso2/product-microgateway/issues/3227
Since we have operational level rate limiting separately, here we have to avoid publishing events for each operations. For that we have to remove the [1] loop and handle operational level events separatly.
[1] https://github.com/wso2/carbon-apimgt/blob/2c7788e5914c457e55a251aa4d6cd20c30b401ef/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/throttling/ThrottleHandler.java#L386
Description
Application level and subscription level rate limit policies (for eg: 10 requests per min) is early rate limited for graphQL APIs.
Steps to Reproduce
Here it looks like APIM publishes events to TM for each operation contained in the graphQL request body.
https://github.com/wso2/carbon-apimgt/blob/2c7788e5914c457e55a251aa4d6cd20c30b401ef/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/throttling/ThrottleHandler.java#L403-L411
Affected Component
APIM
Version
4.2.0-alpha
Environment Details (with versions)
Java version: 11.0.16.1, vendor: Eclipse Adoptium OS name: "mac os x", version: "12.6", arch: "aarch64", family: "mac"
Relevant Log Output
No response
Related Issues
https://github.com/wso2/product-microgateway/issues/3227
Suggested Labels
No response